Index: chrome/browser/browsing_data/browsing_data_remover_unittest.cc |
diff --git a/chrome/browser/browsing_data/browsing_data_remover_unittest.cc b/chrome/browser/browsing_data/browsing_data_remover_unittest.cc |
index 787b46f9cb59438ab265551c8c466b7845828165..74655b3657f95d94703aa826a014b665643d5555 100644 |
--- a/chrome/browser/browsing_data/browsing_data_remover_unittest.cc |
+++ b/chrome/browser/browsing_data/browsing_data_remover_unittest.cc |
@@ -80,6 +80,7 @@ |
#include "content/public/test/test_browser_thread.h" |
#include "content/public/test/test_browser_thread_bundle.h" |
#include "content/public/test/test_utils.h" |
+#include "extensions/features/features.h" |
#include "net/cookies/cookie_store.h" |
#include "net/http/http_network_session.h" |
#include "net/http/http_transaction_factory.h" |
@@ -108,7 +109,7 @@ |
#include "components/signin/core/account_id/account_id.h" |
#endif |
-#if defined(ENABLE_EXTENSIONS) |
+#if BUILDFLAG(ENABLE_EXTENSIONS) |
#include "chrome/browser/extensions/mock_extension_special_storage_policy.h" |
#endif |
@@ -1132,7 +1133,7 @@ class BrowsingDataRemoverTest : public testing::Test { |
~BrowsingDataRemoverTest() override {} |
void TearDown() override { |
-#if defined(ENABLE_EXTENSIONS) |
+#if BUILDFLAG(ENABLE_EXTENSIONS) |
mock_policy_ = nullptr; |
#endif |
@@ -1213,7 +1214,7 @@ class BrowsingDataRemoverTest : public testing::Test { |
} |
MockExtensionSpecialStoragePolicy* CreateMockPolicy() { |
-#if defined(ENABLE_EXTENSIONS) |
+#if BUILDFLAG(ENABLE_EXTENSIONS) |
mock_policy_ = new MockExtensionSpecialStoragePolicy; |
return mock_policy_.get(); |
#else |
@@ -1223,7 +1224,7 @@ class BrowsingDataRemoverTest : public testing::Test { |
} |
storage::SpecialStoragePolicy* mock_policy() { |
-#if defined(ENABLE_EXTENSIONS) |
+#if BUILDFLAG(ENABLE_EXTENSIONS) |
return mock_policy_.get(); |
#else |
return nullptr; |
@@ -1233,7 +1234,7 @@ class BrowsingDataRemoverTest : public testing::Test { |
// If |kOrigin1| is protected when extensions are enabled, the expected |
// result for tests where the OriginMatcherFunction result is variable. |
bool ShouldRemoveForProtectedOriginOne() const { |
-#if defined(ENABLE_EXTENSIONS) |
+#if BUILDFLAG(ENABLE_EXTENSIONS) |
return false; |
#else |
return true; |
@@ -1253,7 +1254,7 @@ class BrowsingDataRemoverTest : public testing::Test { |
StoragePartitionRemovalData storage_partition_removal_data_; |
-#if defined(ENABLE_EXTENSIONS) |
+#if BUILDFLAG(ENABLE_EXTENSIONS) |
scoped_refptr<MockExtensionSpecialStoragePolicy> mock_policy_; |
#endif |
@@ -1447,7 +1448,7 @@ TEST_F(BrowsingDataRemoverTest, RemoveChannelIDsForServerIdentifiers) { |
} |
TEST_F(BrowsingDataRemoverTest, RemoveUnprotectedLocalStorageForever) { |
-#if defined(ENABLE_EXTENSIONS) |
+#if BUILDFLAG(ENABLE_EXTENSIONS) |
MockExtensionSpecialStoragePolicy* policy = CreateMockPolicy(); |
// Protect kOrigin1. |
policy->AddProtected(kOrigin1.GetOrigin()); |
@@ -1477,7 +1478,7 @@ TEST_F(BrowsingDataRemoverTest, RemoveUnprotectedLocalStorageForever) { |
} |
TEST_F(BrowsingDataRemoverTest, RemoveProtectedLocalStorageForever) { |
-#if defined(ENABLE_EXTENSIONS) |
+#if BUILDFLAG(ENABLE_EXTENSIONS) |
// Protect kOrigin1. |
MockExtensionSpecialStoragePolicy* policy = CreateMockPolicy(); |
policy->AddProtected(kOrigin1.GetOrigin()); |
@@ -1508,7 +1509,7 @@ TEST_F(BrowsingDataRemoverTest, RemoveProtectedLocalStorageForever) { |
} |
TEST_F(BrowsingDataRemoverTest, RemoveLocalStorageForLastWeek) { |
-#if defined(ENABLE_EXTENSIONS) |
+#if BUILDFLAG(ENABLE_EXTENSIONS) |
CreateMockPolicy(); |
#endif |
@@ -1732,7 +1733,7 @@ TEST_F(BrowsingDataRemoverTest, RemoveQuotaManagedDataForeverBoth) { |
} |
TEST_F(BrowsingDataRemoverTest, RemoveQuotaManagedDataForeverOnlyTemporary) { |
-#if defined(ENABLE_EXTENSIONS) |
+#if BUILDFLAG(ENABLE_EXTENSIONS) |
CreateMockPolicy(); |
#endif |
@@ -1776,7 +1777,7 @@ TEST_F(BrowsingDataRemoverTest, RemoveQuotaManagedDataForeverOnlyTemporary) { |
} |
TEST_F(BrowsingDataRemoverTest, RemoveQuotaManagedDataForeverOnlyPersistent) { |
-#if defined(ENABLE_EXTENSIONS) |
+#if BUILDFLAG(ENABLE_EXTENSIONS) |
CreateMockPolicy(); |
#endif |
@@ -1820,7 +1821,7 @@ TEST_F(BrowsingDataRemoverTest, RemoveQuotaManagedDataForeverOnlyPersistent) { |
} |
TEST_F(BrowsingDataRemoverTest, RemoveQuotaManagedDataForeverNeither) { |
-#if defined(ENABLE_EXTENSIONS) |
+#if BUILDFLAG(ENABLE_EXTENSIONS) |
CreateMockPolicy(); |
#endif |
@@ -1985,7 +1986,7 @@ TEST_F(BrowsingDataRemoverTest, RemoveQuotaManagedDataForLastWeek) { |
} |
TEST_F(BrowsingDataRemoverTest, RemoveQuotaManagedUnprotectedOrigins) { |
-#if defined(ENABLE_EXTENSIONS) |
+#if BUILDFLAG(ENABLE_EXTENSIONS) |
MockExtensionSpecialStoragePolicy* policy = CreateMockPolicy(); |
// Protect kOrigin1. |
policy->AddProtected(kOrigin1.GetOrigin()); |
@@ -2031,7 +2032,7 @@ TEST_F(BrowsingDataRemoverTest, RemoveQuotaManagedUnprotectedOrigins) { |
} |
TEST_F(BrowsingDataRemoverTest, RemoveQuotaManagedProtectedSpecificOrigin) { |
-#if defined(ENABLE_EXTENSIONS) |
+#if BUILDFLAG(ENABLE_EXTENSIONS) |
MockExtensionSpecialStoragePolicy* policy = CreateMockPolicy(); |
// Protect kOrigin1. |
policy->AddProtected(kOrigin1.GetOrigin()); |
@@ -2083,7 +2084,7 @@ TEST_F(BrowsingDataRemoverTest, RemoveQuotaManagedProtectedSpecificOrigin) { |
} |
TEST_F(BrowsingDataRemoverTest, RemoveQuotaManagedProtectedOrigins) { |
-#if defined(ENABLE_EXTENSIONS) |
+#if BUILDFLAG(ENABLE_EXTENSIONS) |
MockExtensionSpecialStoragePolicy* policy = CreateMockPolicy(); |
// Protect kOrigin1. |
policy->AddProtected(kOrigin1.GetOrigin()); |
@@ -2131,7 +2132,7 @@ TEST_F(BrowsingDataRemoverTest, RemoveQuotaManagedProtectedOrigins) { |
} |
TEST_F(BrowsingDataRemoverTest, RemoveQuotaManagedIgnoreExtensionsAndDevTools) { |
-#if defined(ENABLE_EXTENSIONS) |
+#if BUILDFLAG(ENABLE_EXTENSIONS) |
CreateMockPolicy(); |
#endif |