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

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

Issue 37843003: BrowsingDataRemover, (re)use StoragePartition deletion code. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address comments form mkwst@. Created 7 years, 2 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_unittest.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/public/browser/storage_partition.h
diff --git a/content/public/browser/storage_partition.h b/content/public/browser/storage_partition.h
index b30ca426f83f0a3a7435160d67f6f73543c25620..007f9e7c39fe132b9e9203bdda5e2be6b02b5045 100644
--- a/content/public/browser/storage_partition.h
+++ b/content/public/browser/storage_partition.h
@@ -26,6 +26,7 @@ class URLRequestContextGetter;
namespace quota {
class QuotaManager;
+class SpecialStoragePolicy;
}
namespace webkit_database {
@@ -46,6 +47,13 @@ class DOMStorageContext;
// the cookies, localStorage, etc., that normal web renderers have access to.
class StoragePartition {
public:
+ // A callback type to check if a given origin matches a storage policy.
+ // Can be passed empty/null where used, which means the origin will always
+ // match.
+ typedef base::Callback<bool(const GURL&,
+ quota::SpecialStoragePolicy*)>
+ OriginMatcherFunction;
+
virtual base::FilePath GetPath() = 0;
virtual net::URLRequestContextGetter* GetURLRequestContext() = 0;
virtual net::URLRequestContextGetter* GetMediaURLRequestContext() = 0;
@@ -107,10 +115,20 @@ class StoragePartition {
// then just the data related to this origin.
virtual void ClearDataForRange(uint32 remove_mask,
uint32 quota_storage_remove_mask,
- const base::Time& begin,
- const base::Time& end,
+ const base::Time begin,
+ const base::Time end,
const base::Closure& callback) = 0;
+ // Similar to ClearDataForOrigin(), with a time range.
+ virtual void ClearDataForOriginWithinRange(
jam 2013/10/30 18:15:24 can we combine this with the above, and have a GUR
lazyboy 2013/10/30 19:55:35 Sure, I've merged 3 of the 4 ClearData* functions
+ uint32 remove_mask,
+ uint32 quota_storage_remove_mask,
+ const GURL& storage_origin,
+ const OriginMatcherFunction& origin_matcher,
+ const base::Time begin,
+ const base::Time end,
+ const base::Closure& callback) = 0;
+
protected:
virtual ~StoragePartition() {}
};
« no previous file with comments | « content/browser/storage_partition_impl_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698