summaryrefslogtreecommitdiffstats
path: root/content/browser/storage_partition_impl.h
diff options
context:
space:
mode:
authorlazyboy@chromium.org <lazyboy@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-07-25 03:22:20 +0000
committerlazyboy@chromium.org <lazyboy@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-07-25 03:22:20 +0000
commita34addf5a368f78c2f3957a369c89af78d144c7e (patch)
tree200a2ce05ced83c334a60faa8a443f48f4f26034 /content/browser/storage_partition_impl.h
parent98c19886b3d01f3adeded3c4d4297e404cc0b934 (diff)
downloadchromium_src-a34addf5a368f78c2f3957a369c89af78d144c7e.zip
chromium_src-a34addf5a368f78c2f3957a369c89af78d144c7e.tar.gz
chromium_src-a34addf5a368f78c2f3957a369c89af78d144c7e.tar.bz2
Add support for selectively deleting different bits of StoragePartition related data.
This CL makes the deletion work similar to BrowsingDataRemover in chrome/. This CL is a result of the discussion in crrev.com/16188005 BUG=180118 Test=built: libwebviewchromium, manually tested with browser plugin guest's storage partition, checked clearing cookies and local storage data. Review URL: https://chromiumcodereview.appspot.com/17701002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@213582 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content/browser/storage_partition_impl.h')
-rw-r--r--content/browser/storage_partition_impl.h35
1 files changed, 27 insertions, 8 deletions
diff --git a/content/browser/storage_partition_impl.h b/content/browser/storage_partition_impl.h
index 9dcdfec..0410f4d 100644
--- a/content/browser/storage_partition_impl.h
+++ b/content/browser/storage_partition_impl.h
@@ -31,19 +31,26 @@ class StoragePartitionImpl : public StoragePartition {
virtual webkit_database::DatabaseTracker* GetDatabaseTracker() OVERRIDE;
virtual DOMStorageContextImpl* GetDOMStorageContext() OVERRIDE;
virtual IndexedDBContextImpl* GetIndexedDBContext() OVERRIDE;
- virtual void AsyncClearDataForOrigin(
- uint32 storage_mask,
+
+ virtual void ClearDataForOrigin(
+ uint32 remove_mask,
+ uint32 quota_storage_remove_mask,
const GURL& storage_origin,
net::URLRequestContextGetter* request_context_getter) OVERRIDE;
- virtual void AsyncClearData(uint32 storage_mask) OVERRIDE;
- virtual void AsyncClearDataBetween(
- uint32 storage_mask,
- const base::Time& begin,
- const base::Time& end,
- const base::Closure& callback) OVERRIDE;
+ virtual void ClearDataForUnboundedRange(
+ uint32 remove_mask,
+ uint32 quota_storage_remove_mask) OVERRIDE;
+ virtual void ClearDataForRange(uint32 remove_mask,
+ uint32 quota_storage_remove_mask,
+ const base::Time& begin,
+ const base::Time& end,
+ const base::Closure& callback) OVERRIDE;
WebRTCIdentityStore* GetWebRTCIdentityStore();
+ struct DataDeletionHelper;
+ struct QuotaManagedDataDeletionHelper;
+
private:
friend class StoragePartitionImplMap;
FRIEND_TEST_ALL_PREFIXES(StoragePartitionShaderClearTest, ClearShaderCache);
@@ -58,6 +65,10 @@ class StoragePartitionImpl : public StoragePartition {
bool in_memory,
const base::FilePath& profile_path);
+ // Quota managed data uses a different bitmask for types than
+ // StoragePartition uses. This method generates that mask.
+ static int GenerateQuotaClientMask(uint32 remove_mask);
+
CONTENT_EXPORT StoragePartitionImpl(
const base::FilePath& partition_path,
quota::QuotaManager* quota_manager,
@@ -68,6 +79,14 @@ class StoragePartitionImpl : public StoragePartition {
IndexedDBContextImpl* indexed_db_context,
scoped_ptr<WebRTCIdentityStore> webrtc_identity_store);
+ void ClearDataImpl(uint32 remove_mask,
+ uint32 quota_storage_remove_mask,
+ const GURL& remove_origin,
+ net::URLRequestContextGetter* rq_context,
+ const base::Time begin,
+ const base::Time end,
+ const base::Closure& callback);
+
// Used by StoragePartitionImplMap.
//
// TODO(ajwong): These should be taken in the constructor and in Create() but