Joshua Hood | f3192f0 | 2023-05-10 03:32:17 | [diff] [blame] | 1 | // 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 Hood | f3192f0 | 2023-05-10 03:32:17 | [diff] [blame] | 7 | #include "content/public/browser/browser_thread.h" |
| 8 | #include "content/public/browser/web_contents.h" |
Ryan Tarpine | a9bdd13 | 2025-02-28 20:29:34 | [diff] [blame] | 9 | #include "content/public/common/btm_utils.h" |
Patricia Alfonso | b601bb0 | 2023-08-16 21:09:40 | [diff] [blame] | 10 | #include "content/public/common/content_features.h" |
Joshua Hood | f3192f0 | 2023-05-10 03:32:17 | [diff] [blame] | 11 | |
| 12 | SystemInfoHandler::SystemInfoHandler(protocol::UberDispatcher* dispatcher) { |
| 13 | protocol::SystemInfo::Dispatcher::wire(dispatcher, this); |
| 14 | } |
| 15 | |
| 16 | SystemInfoHandler::~SystemInfoHandler() = default; |
| 17 | |
| 18 | protocol::Response SystemInfoHandler::GetFeatureState( |
| 19 | const std::string& in_featureState, |
| 20 | bool* featureEnabled) { |
| 21 | if (in_featureState == "DIPS") { |
Ryan Tarpine | 07610a64 | 2025-01-16 18:09:29 | [diff] [blame] | 22 | *featureEnabled = base::FeatureList::IsEnabled(features::kBtm) && |
Ryan Tarpine | 07610a64 | 2025-01-16 18:09:29 | [diff] [blame] | 23 | (features::kBtmTriggeringAction.Get() != |
| 24 | content::BtmTriggeringAction::kNone); |
Joshua Hood | f3192f0 | 2023-05-10 03:32:17 | [diff] [blame] | 25 | return protocol::Response::Success(); |
| 26 | } |
| 27 | |
| 28 | return protocol::Response::FallThrough(); |
| 29 | } |