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

Unified Diff: content/public/browser/storage_partition_http_cache_data_remover.h

Issue 2757923002: Move StoragePartitionHttpCacheDataRemover to content/ (Closed)
Patch Set: git cl format 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/public/browser/BUILD.gn ('k') | content/public/test/cache_test_util.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/public/browser/storage_partition_http_cache_data_remover.h
diff --git a/content/public/browser/storage_partition_http_cache_data_remover.h b/content/public/browser/storage_partition_http_cache_data_remover.h
new file mode 100644
index 0000000000000000000000000000000000000000..8148c574755d55baeb961e529ae0bbbeb36ed2cb
--- /dev/null
+++ b/content/public/browser/storage_partition_http_cache_data_remover.h
@@ -0,0 +1,43 @@
+// Copyright 2017 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CONTENT_PUBLIC_BROWSER_STORAGE_PARTITION_HTTP_CACHE_DATA_REMOVER_H_
+#define CONTENT_PUBLIC_BROWSER_STORAGE_PARTITION_HTTP_CACHE_DATA_REMOVER_H_
+
+#include "base/callback_forward.h"
+#include "base/time/time.h"
+#include "content/common/content_export.h"
+
+class GURL;
+
+namespace content {
+
+class StoragePartition;
+
+class CONTENT_EXPORT StoragePartitionHttpCacheDataRemover {
Mike West 2017/03/20 11:03:37 Adding this to //content/public seems like overkil
+ public:
+ // Creates a StoragePartitionHttpCacheDataRemover that deletes cache entries
+ // in the time range between |delete_begin| (inclusively) and |delete_end|
+ // (exclusively).
+ static StoragePartitionHttpCacheDataRemover* CreateForRange(
+ content::StoragePartition* storage_partition,
+ base::Time delete_begin,
+ base::Time delete_end);
+
+ // Similar to CreateForRange(), but only deletes URLs that are matched by
+ // |url_predicate|. Note that the deletion with URL filtering is not built in
+ // to the cache interface and might be slower.
+ static StoragePartitionHttpCacheDataRemover* CreateForURLsAndRange(
+ content::StoragePartition* storage_partition,
+ const base::Callback<bool(const GURL&)>& url_predicate,
+ base::Time delete_begin,
+ base::Time delete_end);
+
+ // Calls |done_callback| upon completion and also destroys itself.
+ virtual void Remove(const base::Closure& done_callback) = 0;
+};
+
+} // namespace content
+
+#endif // CONTENT_PUBLIC_BROWSER_STORAGE_PARTITION_HTTP_CACHE_DATA_REMOVER_H_
« no previous file with comments | « content/public/browser/BUILD.gn ('k') | content/public/test/cache_test_util.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698