Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(519)

Unified Diff: chrome/browser/browsing_data/browsing_data_remover.cc

Issue 2008323002: Add tests for the cache deletion in BrowsingDataRemover (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix memory leak Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | chrome/browser/browsing_data/browsing_data_remover_browsertest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/browsing_data/browsing_data_remover.cc
diff --git a/chrome/browser/browsing_data/browsing_data_remover.cc b/chrome/browser/browsing_data/browsing_data_remover.cc
index 6d9a6b4407211eee3e93ed2c6532043e9f8c07e7..c58ab51a4923239b8d8d0f3ea16a5e224ae75b50 100644
--- a/chrome/browser/browsing_data/browsing_data_remover.cc
+++ b/chrome/browser/browsing_data/browsing_data_remover.cc
@@ -926,10 +926,15 @@ void BrowsingDataRemover::RemoveImpl(
content::StoragePartition::QUOTA_MANAGED_STORAGE_MASK_PERSISTENT;
}
+ // If cookies are supposed to be conditionally deleted from the storage
+ // partition, create a cookie matcher function.
content::StoragePartition::CookieMatcherFunction cookie_matcher;
- if (!filter_builder.IsEmptyBlacklist()) {
+ if (!filter_builder.IsEmptyBlacklist() &&
+ (storage_partition_remove_mask &
+ content::StoragePartition::REMOVE_DATA_MASK_COOKIES)) {
cookie_matcher = filter_builder.BuildCookieFilter();
}
+
storage_partition->ClearData(
storage_partition_remove_mask, quota_storage_remove_mask,
base::Bind(&DoesOriginMatchMaskAndUrls, origin_type_mask_, filter),
« no previous file with comments | « no previous file | chrome/browser/browsing_data/browsing_data_remover_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698