blob: 72734e0b685c9f0e03721a267568dae301784ff3 [file] [log] [blame]
Joshua Hoodf3192f02023-05-10 03:32:171// Copyright 2023 The Chromium Authors
2// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
5#include "chrome/browser/devtools/protocol/system_info_handler.h"
6
Joshua Hoodf3192f02023-05-10 03:32:177#include "content/public/browser/browser_thread.h"
8#include "content/public/browser/web_contents.h"
Ryan Tarpinea9bdd132025-02-28 20:29:349#include "content/public/common/btm_utils.h"
Patricia Alfonsob601bb02023-08-16 21:09:4010#include "content/public/common/content_features.h"
Joshua Hoodf3192f02023-05-10 03:32:1711
12SystemInfoHandler::SystemInfoHandler(protocol::UberDispatcher* dispatcher) {
13 protocol::SystemInfo::Dispatcher::wire(dispatcher, this);
14}
15
16SystemInfoHandler::~SystemInfoHandler() = default;
17
18protocol::Response SystemInfoHandler::GetFeatureState(
19 const std::string& in_featureState,
20 bool* featureEnabled) {
21 if (in_featureState == "DIPS") {
Ryan Tarpine07610a642025-01-16 18:09:2922 *featureEnabled = base::FeatureList::IsEnabled(features::kBtm) &&
Ryan Tarpine07610a642025-01-16 18:09:2923 (features::kBtmTriggeringAction.Get() !=
24 content::BtmTriggeringAction::kNone);
Joshua Hoodf3192f02023-05-10 03:32:1725 return protocol::Response::Success();
26 }
27
28 return protocol::Response::FallThrough();
29}