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

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

Issue 12317062: Expose StoragePartition clear methods for Android WebView (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: GetDefaultStoragePartition Created 7 years, 10 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_map.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 a9314058233d5a02fab01e810f165fb4db192a4f..b0348da5858a25377f0912a04b492fb2d6df5a25 100644
--- a/content/public/browser/storage_partition.h
+++ b/content/public/browser/storage_partition.h
@@ -56,8 +56,26 @@ class StoragePartition {
virtual DOMStorageContext* GetDOMStorageContext() = 0;
virtual IndexedDBContext* GetIndexedDBContext() = 0;
- // Starts an asynchronous task that does a best-effort clear of all the
- // data inside this StoragePartition for the given |storage_origin|.
+ enum StorageMask {
+ kCookies = 1 << 0,
+
+ // Corresponds to quota::kStorageTypeTemporary.
+ kQuotaManagedTemporaryStorage = 1 << 1,
+
+ // Corresponds to quota::kStorageTypePersistent.
+ kQuotaManagedPersistentStorage = 1 << 2,
+
+ // Local dom storage.
+ kLocalDomStorage = 1 << 3,
+ kSessionDomStorage = 1 << 4,
+
+ kAllStorage = -1,
+ };
+
+ // Starts an asynchronous task that does a best-effort clear the data
+ // corresonding to the given |storage_mask| inside this StoragePartition for
+ // the given |storage_origin|. Note kSessionDomStorage is not cleared and the
+ // mask is ignored.
//
// TODO(ajwong): Right now, the embedder may have some
// URLRequestContextGetter objects that the StoragePartition does not know
@@ -65,12 +83,13 @@ class StoragePartition {
// http://crbug.com/159193. Remove |request_context_getter| when that bug
// is fixed.
virtual void AsyncClearDataForOrigin(
+ uint32 storage_mask,
const GURL& storage_origin,
net::URLRequestContextGetter* request_context_getter) = 0;
// Similar to AsyncClearDataForOrigin(), but deletes all data out of the
// StoragePartition rather than just the data related to this origin.
- virtual void AsyncClearAllData() = 0;
+ virtual void AsyncClearData(uint32 storage_mask) = 0;
protected:
virtual ~StoragePartition() {}
« no previous file with comments | « content/browser/storage_partition_impl_map.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698