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

Unified Diff: content/browser/storage_partition_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 | « content/browser/storage_partition_impl.h ('k') | content/public/browser/storage_partition.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/storage_partition_impl.cc
diff --git a/content/browser/storage_partition_impl.cc b/content/browser/storage_partition_impl.cc
index b84229dd504a1bd53397e255fe170a7bb243d0a3..03b107ac75099480c89d755154db9fd3f7244986 100644
--- a/content/browser/storage_partition_impl.cc
+++ b/content/browser/storage_partition_impl.cc
@@ -15,6 +15,7 @@
#include "base/single_thread_task_runner.h"
#include "base/strings/utf_string_conversions.h"
#include "content/browser/browser_main_loop.h"
+#include "content/browser/browsing_data/storage_partition_http_cache_data_remover.h"
#include "content/browser/fileapi/browser_file_system_helper.h"
#include "content/browser/gpu/shader_cache_factory.h"
#include "content/browser/host_zoom_map_impl.h"
@@ -877,6 +878,22 @@ void StoragePartitionImpl::ClearData(
cookie_matcher, GetURLRequestContext(), begin, end, callback);
}
+void StoragePartitionImpl::ClearHttpAndMediaCaches(
+ const base::Time begin,
+ const base::Time end,
+ const base::Callback<bool(const GURL&)>& url_matcher,
+ const base::Closure& callback) {
+ // StoragePartitionHttpCacheDataRemover deletes itself when it is done.
+ if (url_matcher.is_null()) {
+ StoragePartitionHttpCacheDataRemover::CreateForRange(this, begin, end)
+ ->Remove(callback);
+ } else {
+ StoragePartitionHttpCacheDataRemover::CreateForURLsAndRange(
+ this, url_matcher, begin, end)
+ ->Remove(callback);
+ }
+}
+
void StoragePartitionImpl::Flush() {
DCHECK_CURRENTLY_ON(BrowserThread::UI);
if (GetDOMStorageContext())
« no previous file with comments | « content/browser/storage_partition_impl.h ('k') | content/public/browser/storage_partition.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698