Chromium Code Reviews| 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..42fbb7c7453e9094f65038986e9cd2c064a9485d 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; |
|
jam
2013/10/31 00:06:05
nit: move this to line 108, convention for content
lazyboy
2013/10/31 20:55:30
Done.
|
| + |
| virtual base::FilePath GetPath() = 0; |
| virtual net::URLRequestContextGetter* GetURLRequestContext() = 0; |
| virtual net::URLRequestContextGetter* GetMediaURLRequestContext() = 0; |
| @@ -97,19 +105,19 @@ class StoragePartition { |
| const GURL& storage_origin, |
| net::URLRequestContextGetter* rq_context) = 0; |
| - // Similar to ClearDataForOrigin(), but deletes all data out of the |
| - // StoragePartition rather than just the data related to this origin. |
| - virtual void ClearDataForUnboundedRange(uint32 remove_mask, |
| - uint32 quota_storage_remove_mask) = 0; |
| - |
| - // Similar to ClearDataForOrigin(), but deletes all the data out of the |
| - // StoragePartion from between the given |begin| and |end| dates rather |
| - // 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::Closure& callback) = 0; |
| + // Similar to ClearDataForOrigin(). |
| + // Deletes all data out fo the StoragePartition if |storage_origin| is NULL. |
| + // |origin_matcher| is present if special storage policy is to be handled, |
| + // otherwise the callback can be null (base::Callback::is_null() == true). |
| + // |callback| is called when data deletion is done or at least the deletion is |
| + // scheduled. |
| + virtual void ClearData(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() {} |