blob: 714ce837236e8c6e8904c3b2ca6ee3f8e2e849d1 [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"
Patricia Alfonsob601bb02023-08-16 21:09:409#include "content/public/common/content_features.h"
10#include "content/public/common/dips_utils.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) &&
23 features::kBtmDeletionEnabled.Get() &&
24 (features::kBtmTriggeringAction.Get() !=
25 content::BtmTriggeringAction::kNone);
Joshua Hoodf3192f02023-05-10 03:32:1726 return protocol::Response::Success();
27 }
28
29 return protocol::Response::FallThrough();
30}