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() {} |
}; |