Revert "[DIPS] Rename DIPS prefix to Btm."
This reverts commit 4d4b33ce5cf2e18c6f2b2a120b2a8064db75c351.
Reason for revert: Tree closure for compile failure
Original change's description:
> [DIPS] Rename DIPS prefix to Btm.
>
> This makes it match the external name (Bounce Tracking Mitigations) and
> comply with the C++ style guide, which says "prefer to capitalize
> abbreviations as single words".
>
> A followup CL will rename filename prefixes from dips_ to btm_ (and the
> directories from dips/ to btm/).
>
> Bug: 388538934
> Change-Id: I43d3f1c24632919ac8985aea5b7f2d945d2a9628
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6172859
> Owners-Override: Avi Drissman <[email protected]>
> Commit-Queue: Ryan Tarpine <[email protected]>
> Reviewed-by: Avi Drissman <[email protected]>
> Cr-Commit-Position: refs/heads/main@{#1406975}
Bug: 388538934
Change-Id: Ic86e19c9c3a23d7dcb014bab5bc6bc13419a0ae0
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6173773
Bot-Commit: Rubber Stamper <[email protected]>
Auto-Submit: Joey Arhar <[email protected]>
Owners-Override: Joey Arhar <[email protected]>
Commit-Queue: Joey Arhar <[email protected]>
Cr-Commit-Position: refs/heads/main@{#1406979}
diff --git a/chrome/browser/devtools/protocol/devtools_protocol_browsertest.cc b/chrome/browser/devtools/protocol/devtools_protocol_browsertest.cc
index 94a0826..17372682 100644
--- a/chrome/browser/devtools/protocol/devtools_protocol_browsertest.cc
+++ b/chrome/browser/devtools/protocol/devtools_protocol_browsertest.cc
@@ -546,7 +546,7 @@
protected:
void SetUp() override {
scoped_feature_list_.InitWithFeaturesAndParameters(
- /*enabled_features=*/{{features::kBtm,
+ /*enabled_features=*/{{features::kDIPS,
{{"delete", "true"},
{"triggering_action", "stateful_bounce"}}}},
/*disabled_features=*/{});
@@ -589,8 +589,8 @@
return testing::AssertionFailure() << "Failed to wait for loading to stop";
}
- content::BtmService* dips_service =
- content::BtmService::Get(web_contents->GetBrowserContext());
+ content::DIPSService* dips_service =
+ content::DIPSService::Get(web_contents->GetBrowserContext());
if (!content::NavigateToURLFromRenderer(web_contents, bounce_url)) {
return testing::AssertionFailure()
<< "Failed to navigate to " << bounce_url;
@@ -626,14 +626,15 @@
<< final_observer.redirects()->size();
}
- const content::BtmRedirectInfo& redirect = *final_observer.redirects()->at(0);
+ const content::DIPSRedirectInfo& redirect =
+ *final_observer.redirects()->at(0);
if (redirect.url.url != bounce_url) {
return testing::AssertionFailure() << "Expected redirect at " << bounce_url
<< "; found " << redirect.url.url;
}
- if (redirect.access_type != content::BtmDataAccessType::kWrite &&
- redirect.access_type != content::BtmDataAccessType::kReadWrite) {
+ if (redirect.access_type != content::DIPSDataAccessType::kWrite &&
+ redirect.access_type != content::DIPSDataAccessType::kReadWrite) {
return testing::AssertionFailure()
<< "No write access recorded for redirect";
}
@@ -671,15 +672,15 @@
EXPECT_THAT(deleted_sites, testing::ElementsAre("example.test"));
}
-class BtmStatusDevToolsProtocolTest
+class DIPSStatusDevToolsProtocolTest
: public DevToolsProtocolTest,
public testing::WithParamInterface<std::tuple<bool, bool, std::string>> {
// The fields of `GetParam()` indicate/control the following:
- // `std::get<0>(GetParam())` => `features::kBtm`
- // `std::get<1>(GetParam())` => `features::kBtmDeletionEnabled`
- // `std::get<2>(GetParam())` => `features::kBtmTriggeringAction`
+ // `std::get<0>(GetParam())` => `features::kDIPS`
+ // `std::get<1>(GetParam())` => `features::kDIPSDeletionEnabled`
+ // `std::get<2>(GetParam())` => `features::kDIPSTriggeringAction`
//
- // In order for Bounce Tracking Mitigations to take effect, `features::kBtm`
+ // In order for Bounce Tracking Mitigations to take effect, `features::kDIPS`
// must be true/enabled, `kDeletionEnabled` must be true, and
// `kTriggeringAction` must NOT be `none`.
//
@@ -690,11 +691,11 @@
void SetUp() override {
if (std::get<0>(GetParam())) {
scoped_feature_list_.InitAndEnableFeatureWithParameters(
- features::kBtm,
+ features::kDIPS,
{{"delete", base::ToString((std::get<1>(GetParam())))},
{"triggering_action", std::get<2>(GetParam())}});
} else {
- scoped_feature_list_.InitAndDisableFeature(features::kBtm);
+ scoped_feature_list_.InitAndDisableFeature(features::kDIPS);
}
DevToolsProtocolTest::SetUp();
@@ -709,7 +710,7 @@
base::test::ScopedFeatureList scoped_feature_list_;
};
-IN_PROC_BROWSER_TEST_P(BtmStatusDevToolsProtocolTest,
+IN_PROC_BROWSER_TEST_P(DIPSStatusDevToolsProtocolTest,
TrueWhenEnabledAndDeleting) {
AttachToBrowserTarget();
@@ -722,7 +723,7 @@
INSTANTIATE_TEST_SUITE_P(
All,
- BtmStatusDevToolsProtocolTest,
+ DIPSStatusDevToolsProtocolTest,
::testing::Combine(
::testing::Bool(),
::testing::Bool(),
diff --git a/chrome/browser/devtools/protocol/storage_handler.cc b/chrome/browser/devtools/protocol/storage_handler.cc
index 1668033c..c6b7cd0 100644
--- a/chrome/browser/devtools/protocol/storage_handler.cc
+++ b/chrome/browser/devtools/protocol/storage_handler.cc
@@ -25,13 +25,13 @@
// TODO: crbug.com/380896828 - move CDP support for DIPS to //content.
void StorageHandler::RunBounceTrackingMitigations(
std::unique_ptr<RunBounceTrackingMitigationsCallback> callback) {
- content::BtmService* dips_service =
+ content::DIPSService* dips_service =
web_contents_
- ? content::BtmService::Get(web_contents_->GetBrowserContext())
+ ? content::DIPSService::Get(web_contents_->GetBrowserContext())
: nullptr;
if (!dips_service) {
- callback->sendFailure(protocol::Response::ServerError("No BtmService"));
+ callback->sendFailure(protocol::Response::ServerError("No DIPSService"));
return;
}
diff --git a/chrome/browser/devtools/protocol/system_info_handler.cc b/chrome/browser/devtools/protocol/system_info_handler.cc
index 714ce837..bcbb1449 100644
--- a/chrome/browser/devtools/protocol/system_info_handler.cc
+++ b/chrome/browser/devtools/protocol/system_info_handler.cc
@@ -19,10 +19,10 @@
const std::string& in_featureState,
bool* featureEnabled) {
if (in_featureState == "DIPS") {
- *featureEnabled = base::FeatureList::IsEnabled(features::kBtm) &&
- features::kBtmDeletionEnabled.Get() &&
- (features::kBtmTriggeringAction.Get() !=
- content::BtmTriggeringAction::kNone);
+ *featureEnabled = base::FeatureList::IsEnabled(features::kDIPS) &&
+ features::kDIPSDeletionEnabled.Get() &&
+ (features::kDIPSTriggeringAction.Get() !=
+ content::DIPSTriggeringAction::kNone);
return protocol::Response::Success();
}