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 c4de8ee4cf92a2a225ffc7964d6c193b11753ff3..f0c9f9645bdbd5a0c63c5c9913b68422320ae52f 100644 |
--- a/chrome/browser/browsing_data/browsing_data_remover_unittest.cc |
+++ b/chrome/browser/browsing_data/browsing_data_remover_unittest.cc |
@@ -821,11 +821,9 @@ TEST_F(BrowsingDataRemoverTest, RemoveCookieForever) { |
// Verify that storage partition was instructed to remove the cookies. |
StoragePartitionRemovalData removal_data = GetStoragePartitionRemovalData(); |
EXPECT_EQ(removal_data.remove_mask, |
- static_cast<uint32>( |
- StoragePartition::REMOVE_DATA_MASK_COOKIES)); |
+ StoragePartition::REMOVE_DATA_MASK_COOKIES); |
EXPECT_EQ(removal_data.quota_storage_remove_mask, |
- static_cast<uint32>( |
- StoragePartition::QUOTA_MANAGED_STORAGE_MASK_ALL)); |
+ StoragePartition::QUOTA_MANAGED_STORAGE_MASK_ALL); |
EXPECT_TRUE(removal_data.remove_origin.is_empty()); |
EXPECT_EQ(removal_data.remove_begin, GetBeginTime()); |
} |
@@ -841,14 +839,11 @@ TEST_F(BrowsingDataRemoverTest, RemoveCookieLastHour) { |
// Verify that storage partition was instructed to remove the cookies. |
StoragePartitionRemovalData removal_data = GetStoragePartitionRemovalData(); |
EXPECT_EQ(removal_data.remove_mask, |
- static_cast<uint32>( |
- StoragePartition::REMOVE_DATA_MASK_COOKIES)); |
+ StoragePartition::REMOVE_DATA_MASK_COOKIES); |
// Removing with time period other than EVERYTHING should not clear |
// persistent storage data. |
EXPECT_EQ(removal_data.quota_storage_remove_mask, |
- static_cast<uint32>( |
- StoragePartition::QUOTA_MANAGED_STORAGE_MASK_ALL & |
- ~StoragePartition::QUOTA_MANAGED_STORAGE_MASK_PERSISTENT)); |
+ ~StoragePartition::QUOTA_MANAGED_STORAGE_MASK_PERSISTENT); |
EXPECT_TRUE(removal_data.remove_origin.is_empty()); |
EXPECT_EQ(removal_data.remove_begin, GetBeginTime()); |
} |
@@ -942,11 +937,9 @@ TEST_F(BrowsingDataRemoverTest, RemoveUnprotectedLocalStorageForever) { |
// Verify that storage partition was instructed to remove the data correctly. |
StoragePartitionRemovalData removal_data = GetStoragePartitionRemovalData(); |
EXPECT_EQ(removal_data.remove_mask, |
- static_cast<uint32>( |
- StoragePartition::REMOVE_DATA_MASK_LOCAL_STORAGE)); |
+ StoragePartition::REMOVE_DATA_MASK_LOCAL_STORAGE); |
EXPECT_EQ(removal_data.quota_storage_remove_mask, |
- static_cast<uint32>( |
- StoragePartition::QUOTA_MANAGED_STORAGE_MASK_ALL)); |
+ StoragePartition::QUOTA_MANAGED_STORAGE_MASK_ALL); |
EXPECT_TRUE(removal_data.remove_origin.is_empty()); |
EXPECT_EQ(removal_data.remove_begin, GetBeginTime()); |
@@ -975,11 +968,9 @@ TEST_F(BrowsingDataRemoverTest, RemoveProtectedLocalStorageForever) { |
// Verify that storage partition was instructed to remove the data correctly. |
StoragePartitionRemovalData removal_data = GetStoragePartitionRemovalData(); |
EXPECT_EQ(removal_data.remove_mask, |
- static_cast<uint32>( |
- StoragePartition::REMOVE_DATA_MASK_LOCAL_STORAGE)); |
+ StoragePartition::REMOVE_DATA_MASK_LOCAL_STORAGE); |
EXPECT_EQ(removal_data.quota_storage_remove_mask, |
- static_cast<uint32>( |
- StoragePartition::QUOTA_MANAGED_STORAGE_MASK_ALL)); |
+ StoragePartition::QUOTA_MANAGED_STORAGE_MASK_ALL); |
EXPECT_TRUE(removal_data.remove_origin.is_empty()); |
EXPECT_EQ(removal_data.remove_begin, GetBeginTime()); |
@@ -1006,13 +997,10 @@ TEST_F(BrowsingDataRemoverTest, RemoveLocalStorageForLastWeek) { |
// Verify that storage partition was instructed to remove the data correctly. |
StoragePartitionRemovalData removal_data = GetStoragePartitionRemovalData(); |
EXPECT_EQ(removal_data.remove_mask, |
- static_cast<uint32>( |
- StoragePartition::REMOVE_DATA_MASK_LOCAL_STORAGE)); |
+ StoragePartition::REMOVE_DATA_MASK_LOCAL_STORAGE); |
// Persistent storage won't be deleted. |
EXPECT_EQ(removal_data.quota_storage_remove_mask, |
- static_cast<uint32>( |
- StoragePartition::QUOTA_MANAGED_STORAGE_MASK_ALL & |
- ~StoragePartition::QUOTA_MANAGED_STORAGE_MASK_PERSISTENT)); |
+ ~StoragePartition::QUOTA_MANAGED_STORAGE_MASK_PERSISTENT); |
EXPECT_TRUE(removal_data.remove_origin.is_empty()); |
EXPECT_EQ(removal_data.remove_begin, GetBeginTime()); |
@@ -1106,11 +1094,9 @@ TEST_F(BrowsingDataRemoverTest, RemoveMultipleTypes) { |
// partition was requested to remove cookie. |
StoragePartitionRemovalData removal_data = GetStoragePartitionRemovalData(); |
EXPECT_EQ(removal_data.remove_mask, |
- static_cast<uint32>( |
- StoragePartition::REMOVE_DATA_MASK_COOKIES)); |
+ StoragePartition::REMOVE_DATA_MASK_COOKIES); |
EXPECT_EQ(removal_data.quota_storage_remove_mask, |
- static_cast<uint32>( |
- StoragePartition::QUOTA_MANAGED_STORAGE_MASK_ALL)); |
+ StoragePartition::QUOTA_MANAGED_STORAGE_MASK_ALL); |
} |
// This should crash (DCHECK) in Debug, but death tests don't work properly |
@@ -1141,13 +1127,10 @@ TEST_F(BrowsingDataRemoverTest, RemoveMultipleTypesHistoryProhibited) { |
// the partition was requested to remove cookie. |
StoragePartitionRemovalData removal_data = GetStoragePartitionRemovalData(); |
EXPECT_EQ(removal_data.remove_mask, |
- static_cast<uint32>( |
- StoragePartition::REMOVE_DATA_MASK_COOKIES)); |
+ StoragePartition::REMOVE_DATA_MASK_COOKIES); |
// Persistent storage won't be deleted, since EVERYTHING was not specified. |
EXPECT_EQ(removal_data.quota_storage_remove_mask, |
- static_cast<uint32>( |
- StoragePartition::QUOTA_MANAGED_STORAGE_MASK_ALL & |
- ~StoragePartition::QUOTA_MANAGED_STORAGE_MASK_PERSISTENT)); |
+ ~StoragePartition::QUOTA_MANAGED_STORAGE_MASK_PERSISTENT); |
} |
#endif |
@@ -1168,14 +1151,12 @@ TEST_F(BrowsingDataRemoverTest, RemoveQuotaManagedDataForeverBoth) { |
// Verify storage partition related stuffs. |
StoragePartitionRemovalData removal_data = GetStoragePartitionRemovalData(); |
EXPECT_EQ(removal_data.remove_mask, |
- static_cast<uint32>( |
- StoragePartition::REMOVE_DATA_MASK_FILE_SYSTEMS | |
+ StoragePartition::REMOVE_DATA_MASK_FILE_SYSTEMS | |
StoragePartition::REMOVE_DATA_MASK_WEBSQL | |
StoragePartition::REMOVE_DATA_MASK_APPCACHE | |
- StoragePartition::REMOVE_DATA_MASK_INDEXEDDB)); |
+ StoragePartition::REMOVE_DATA_MASK_INDEXEDDB); |
EXPECT_EQ(removal_data.quota_storage_remove_mask, |
- static_cast<uint32>( |
- StoragePartition::QUOTA_MANAGED_STORAGE_MASK_ALL)); |
+ StoragePartition::QUOTA_MANAGED_STORAGE_MASK_ALL); |
EXPECT_TRUE(removal_data.remove_origin.is_empty()); |
} |
@@ -1201,14 +1182,12 @@ TEST_F(BrowsingDataRemoverTest, RemoveQuotaManagedDataForeverOnlyTemporary) { |
StoragePartitionRemovalData removal_data = GetStoragePartitionRemovalData(); |
EXPECT_EQ(removal_data.remove_mask, |
- static_cast<uint32>( |
- StoragePartition::REMOVE_DATA_MASK_FILE_SYSTEMS | |
+ StoragePartition::REMOVE_DATA_MASK_FILE_SYSTEMS | |
StoragePartition::REMOVE_DATA_MASK_WEBSQL | |
StoragePartition::REMOVE_DATA_MASK_APPCACHE | |
- StoragePartition::REMOVE_DATA_MASK_INDEXEDDB)); |
+ StoragePartition::REMOVE_DATA_MASK_INDEXEDDB); |
EXPECT_EQ(removal_data.quota_storage_remove_mask, |
- static_cast<uint32>( |
- StoragePartition::QUOTA_MANAGED_STORAGE_MASK_ALL)); |
+ StoragePartition::QUOTA_MANAGED_STORAGE_MASK_ALL); |
EXPECT_TRUE(removal_data.remove_origin.is_empty()); |
// Check that all related origin data would be removed, that is, origin |
@@ -1240,14 +1219,12 @@ TEST_F(BrowsingDataRemoverTest, RemoveQuotaManagedDataForeverOnlyPersistent) { |
StoragePartitionRemovalData removal_data = GetStoragePartitionRemovalData(); |
EXPECT_EQ(removal_data.remove_mask, |
- static_cast<uint32>( |
- StoragePartition::REMOVE_DATA_MASK_FILE_SYSTEMS | |
+ StoragePartition::REMOVE_DATA_MASK_FILE_SYSTEMS | |
StoragePartition::REMOVE_DATA_MASK_WEBSQL | |
StoragePartition::REMOVE_DATA_MASK_APPCACHE | |
- StoragePartition::REMOVE_DATA_MASK_INDEXEDDB)); |
+ StoragePartition::REMOVE_DATA_MASK_INDEXEDDB); |
EXPECT_EQ(removal_data.quota_storage_remove_mask, |
- static_cast<uint32>( |
- StoragePartition::QUOTA_MANAGED_STORAGE_MASK_ALL)); |
+ StoragePartition::QUOTA_MANAGED_STORAGE_MASK_ALL); |
EXPECT_TRUE(removal_data.remove_origin.is_empty()); |
// Check that all related origin data would be removed, that is, origin |
@@ -1280,14 +1257,12 @@ TEST_F(BrowsingDataRemoverTest, RemoveQuotaManagedDataForeverNeither) { |
StoragePartitionRemovalData removal_data = GetStoragePartitionRemovalData(); |
EXPECT_EQ(removal_data.remove_mask, |
- static_cast<uint32>( |
- StoragePartition::REMOVE_DATA_MASK_FILE_SYSTEMS | |
+ StoragePartition::REMOVE_DATA_MASK_FILE_SYSTEMS | |
StoragePartition::REMOVE_DATA_MASK_WEBSQL | |
StoragePartition::REMOVE_DATA_MASK_APPCACHE | |
- StoragePartition::REMOVE_DATA_MASK_INDEXEDDB)); |
+ StoragePartition::REMOVE_DATA_MASK_INDEXEDDB); |
EXPECT_EQ(removal_data.quota_storage_remove_mask, |
- static_cast<uint32>( |
- StoragePartition::QUOTA_MANAGED_STORAGE_MASK_ALL)); |
+ StoragePartition::QUOTA_MANAGED_STORAGE_MASK_ALL); |
EXPECT_TRUE(removal_data.remove_origin.is_empty()); |
// Check that all related origin data would be removed, that is, origin |
@@ -1316,14 +1291,12 @@ TEST_F(BrowsingDataRemoverTest, RemoveQuotaManagedDataForeverSpecificOrigin) { |
StoragePartitionRemovalData removal_data = GetStoragePartitionRemovalData(); |
EXPECT_EQ(removal_data.remove_mask, |
- static_cast<uint32>( |
- StoragePartition::REMOVE_DATA_MASK_FILE_SYSTEMS | |
+ StoragePartition::REMOVE_DATA_MASK_FILE_SYSTEMS | |
StoragePartition::REMOVE_DATA_MASK_WEBSQL | |
StoragePartition::REMOVE_DATA_MASK_APPCACHE | |
- StoragePartition::REMOVE_DATA_MASK_INDEXEDDB)); |
+ StoragePartition::REMOVE_DATA_MASK_INDEXEDDB); |
EXPECT_EQ(removal_data.quota_storage_remove_mask, |
- static_cast<uint32>( |
- StoragePartition::QUOTA_MANAGED_STORAGE_MASK_ALL)); |
+ StoragePartition::QUOTA_MANAGED_STORAGE_MASK_ALL); |
EXPECT_EQ(removal_data.remove_origin, kOrigin1); |
} |
@@ -1345,11 +1318,10 @@ TEST_F(BrowsingDataRemoverTest, RemoveQuotaManagedDataForLastHour) { |
StoragePartitionRemovalData removal_data = GetStoragePartitionRemovalData(); |
EXPECT_EQ(removal_data.remove_mask, |
- static_cast<uint32>( |
- StoragePartition::REMOVE_DATA_MASK_FILE_SYSTEMS | |
+ StoragePartition::REMOVE_DATA_MASK_FILE_SYSTEMS | |
StoragePartition::REMOVE_DATA_MASK_WEBSQL | |
StoragePartition::REMOVE_DATA_MASK_APPCACHE | |
- StoragePartition::REMOVE_DATA_MASK_INDEXEDDB)); |
+ StoragePartition::REMOVE_DATA_MASK_INDEXEDDB); |
// Persistent data would be left out since we are not removing from |
// beginning of time. |
@@ -1379,11 +1351,10 @@ TEST_F(BrowsingDataRemoverTest, RemoveQuotaManagedDataForLastWeek) { |
StoragePartitionRemovalData removal_data = GetStoragePartitionRemovalData(); |
EXPECT_EQ(removal_data.remove_mask, |
- static_cast<uint32>( |
- StoragePartition::REMOVE_DATA_MASK_FILE_SYSTEMS | |
+ StoragePartition::REMOVE_DATA_MASK_FILE_SYSTEMS | |
StoragePartition::REMOVE_DATA_MASK_WEBSQL | |
StoragePartition::REMOVE_DATA_MASK_APPCACHE | |
- StoragePartition::REMOVE_DATA_MASK_INDEXEDDB)); |
+ StoragePartition::REMOVE_DATA_MASK_INDEXEDDB); |
// Persistent data would be left out since we are not removing from |
// beginning of time. |
@@ -1419,14 +1390,12 @@ TEST_F(BrowsingDataRemoverTest, RemoveQuotaManagedUnprotectedOrigins) { |
StoragePartitionRemovalData removal_data = GetStoragePartitionRemovalData(); |
EXPECT_EQ(removal_data.remove_mask, |
- static_cast<uint32>( |
- StoragePartition::REMOVE_DATA_MASK_FILE_SYSTEMS | |
+ StoragePartition::REMOVE_DATA_MASK_FILE_SYSTEMS | |
StoragePartition::REMOVE_DATA_MASK_WEBSQL | |
StoragePartition::REMOVE_DATA_MASK_APPCACHE | |
- StoragePartition::REMOVE_DATA_MASK_INDEXEDDB)); |
+ StoragePartition::REMOVE_DATA_MASK_INDEXEDDB); |
EXPECT_EQ(removal_data.quota_storage_remove_mask, |
- static_cast<uint32>( |
- StoragePartition::QUOTA_MANAGED_STORAGE_MASK_ALL)); |
+ StoragePartition::QUOTA_MANAGED_STORAGE_MASK_ALL); |
EXPECT_TRUE(removal_data.remove_origin.is_empty()); |
// Check OriginMatcherFunction, |kOrigin1| would not match mask since it |
@@ -1461,14 +1430,12 @@ TEST_F(BrowsingDataRemoverTest, RemoveQuotaManagedProtectedSpecificOrigin) { |
StoragePartitionRemovalData removal_data = GetStoragePartitionRemovalData(); |
EXPECT_EQ(removal_data.remove_mask, |
- static_cast<uint32>( |
- StoragePartition::REMOVE_DATA_MASK_FILE_SYSTEMS | |
+ StoragePartition::REMOVE_DATA_MASK_FILE_SYSTEMS | |
StoragePartition::REMOVE_DATA_MASK_WEBSQL | |
StoragePartition::REMOVE_DATA_MASK_APPCACHE | |
- StoragePartition::REMOVE_DATA_MASK_INDEXEDDB)); |
+ StoragePartition::REMOVE_DATA_MASK_INDEXEDDB); |
EXPECT_EQ(removal_data.quota_storage_remove_mask, |
- static_cast<uint32>( |
- StoragePartition::QUOTA_MANAGED_STORAGE_MASK_ALL)); |
+ StoragePartition::QUOTA_MANAGED_STORAGE_MASK_ALL); |
EXPECT_EQ(removal_data.remove_origin, kOrigin1); |
// Check OriginMatcherFunction, |kOrigin1| would not match mask since it |
@@ -1504,14 +1471,12 @@ TEST_F(BrowsingDataRemoverTest, RemoveQuotaManagedProtectedOrigins) { |
StoragePartitionRemovalData removal_data = GetStoragePartitionRemovalData(); |
EXPECT_EQ(removal_data.remove_mask, |
- static_cast<uint32>( |
- StoragePartition::REMOVE_DATA_MASK_FILE_SYSTEMS | |
+ StoragePartition::REMOVE_DATA_MASK_FILE_SYSTEMS | |
StoragePartition::REMOVE_DATA_MASK_WEBSQL | |
StoragePartition::REMOVE_DATA_MASK_APPCACHE | |
- StoragePartition::REMOVE_DATA_MASK_INDEXEDDB)); |
+ StoragePartition::REMOVE_DATA_MASK_INDEXEDDB); |
EXPECT_EQ(removal_data.quota_storage_remove_mask, |
- static_cast<uint32>( |
- StoragePartition::QUOTA_MANAGED_STORAGE_MASK_ALL)); |
+ StoragePartition::QUOTA_MANAGED_STORAGE_MASK_ALL); |
EXPECT_TRUE(removal_data.remove_origin.is_empty()); |
// Check OriginMatcherFunction, |kOrigin1| would match mask since we |
@@ -1543,14 +1508,12 @@ TEST_F(BrowsingDataRemoverTest, RemoveQuotaManagedIgnoreExtensionsAndDevTools) { |
StoragePartitionRemovalData removal_data = GetStoragePartitionRemovalData(); |
EXPECT_EQ(removal_data.remove_mask, |
- static_cast<uint32>( |
- StoragePartition::REMOVE_DATA_MASK_FILE_SYSTEMS | |
+ StoragePartition::REMOVE_DATA_MASK_FILE_SYSTEMS | |
StoragePartition::REMOVE_DATA_MASK_WEBSQL | |
StoragePartition::REMOVE_DATA_MASK_APPCACHE | |
- StoragePartition::REMOVE_DATA_MASK_INDEXEDDB)); |
+ StoragePartition::REMOVE_DATA_MASK_INDEXEDDB); |
EXPECT_EQ(removal_data.quota_storage_remove_mask, |
- static_cast<uint32>( |
- StoragePartition::QUOTA_MANAGED_STORAGE_MASK_ALL)); |
+ StoragePartition::QUOTA_MANAGED_STORAGE_MASK_ALL); |
EXPECT_TRUE(removal_data.remove_origin.is_empty()); |
// Check that extension and devtools data wouldn't be removed, that is, |