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

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

Issue 2757923002: Move StoragePartitionHttpCacheDataRemover to content/ (Closed)
Patch Set: Rebase. Created 3 years, 9 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_impl_unittest.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_impl.cc
diff --git a/chrome/browser/browsing_data/browsing_data_remover_impl.cc b/chrome/browser/browsing_data/browsing_data_remover_impl.cc
index 0570ff28b77494e75bdb3a1806ed7726203c93d9..82a5440be90513f1c81d1280e72367b908c3f8cb 100644
--- a/chrome/browser/browsing_data/browsing_data_remover_impl.cc
+++ b/chrome/browser/browsing_data/browsing_data_remover_impl.cc
@@ -18,7 +18,6 @@
#include "chrome/browser/browsing_data/browsing_data_remover_delegate.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/common/pref_names.h"
-#include "components/browsing_data/content/storage_partition_http_cache_data_remover.h"
#include "components/prefs/pref_service.h"
#include "content/public/browser/browser_context.h"
#include "content/public/browser/browser_thread.h"
@@ -472,17 +471,17 @@ void BrowsingDataRemoverImpl::RemoveImpl(
content::StoragePartition::REMOVE_DATA_MASK_PLUGIN_PRIVATE_DATA;
}
+ content::StoragePartition* storage_partition;
+ if (storage_partition_for_testing_) {
+ storage_partition = storage_partition_for_testing_;
+ } else {
+ storage_partition =
+ BrowserContext::GetDefaultStoragePartition(browser_context_);
+ }
+
if (storage_partition_remove_mask) {
clear_storage_partition_data_.Start();
- content::StoragePartition* storage_partition;
- if (storage_partition_for_testing_) {
- storage_partition = storage_partition_for_testing_;
- } else {
- storage_partition =
- BrowserContext::GetDefaultStoragePartition(browser_context_);
- }
-
uint32_t quota_storage_remove_mask =
~content::StoragePartition::QUOTA_MANAGED_STORAGE_MASK_PERSISTENT;
@@ -519,19 +518,11 @@ void BrowsingDataRemoverImpl::RemoveImpl(
// TODO(msramek): Clear the cache of all renderers.
clear_cache_.Start();
- // StoragePartitionHttpCacheDataRemover deletes itself when it is done.
- if (filter_builder.IsEmptyBlacklist()) {
- browsing_data::StoragePartitionHttpCacheDataRemover::CreateForRange(
- BrowserContext::GetDefaultStoragePartition(browser_context_),
- delete_begin_, delete_end_)
- ->Remove(clear_cache_.GetCompletionCallback());
- } else {
- browsing_data::StoragePartitionHttpCacheDataRemover::
- CreateForURLsAndRange(
- BrowserContext::GetDefaultStoragePartition(browser_context_),
- filter, delete_begin_, delete_end_)
- ->Remove(clear_cache_.GetCompletionCallback());
- }
+ storage_partition->ClearHttpAndMediaCaches(
+ delete_begin, delete_end,
+ filter_builder.IsEmptyBlacklist() ? base::Callback<bool(const GURL&)>()
+ : filter,
+ clear_cache_.GetCompletionCallback());
// Tell the shader disk cache to clear.
content::RecordAction(UserMetricsAction("ClearBrowsingData_ShaderCache"));
« no previous file with comments | « no previous file | chrome/browser/browsing_data/browsing_data_remover_impl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698