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-31 06:23:46 +0000
committerlazyboy@chromium.org <lazyboy@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-07-31 06:23:46 +0000
commitfdf3e13c44fd319d3cc186ea46eebfb0eafe53ad (patch)
treeb0453be082f8e30e557da7bd097b8fc189e014e9 /content/browser/storage_partition_impl.h
parentf7f61087146eff6339cb5a5ab35ae6ad486b30aa (diff)
downloadchromium_src-fdf3e13c44fd319d3cc186ea46eebfb0eafe53ad.zip
chromium_src-fdf3e13c44fd319d3cc186ea46eebfb0eafe53ad.tar.gz
chromium_src-fdf3e13c44fd319d3cc186ea46eebfb0eafe53ad.tar.bz2
Add support for selectively deleting different bits of StoragePartition related data.
Reland r213582 after fixing memory leak (via LeakSanitizer). This CL makes the deletion work similar to BrowsingDataRemover in chrome/. This CL is a result of the discussion in crrev.com/16188005 BUG=174763,180118,264188 Test=built: libwebviewchromium, manually tested with browser plugin guest's storage partition, checked clearing cookies and local storage data. Ran unit_tests target with LeakSanitizer/"detect_leaks=1" Review URL: https://chromiumcodereview.appspot.com/20543002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@214585 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