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

Unified Diff: content/browser/dom_storage/local_storage_context_mojo.h

Issue 2605133002: Add method to delete storage for origins to LocalStorageContextMojo. (Closed)
Patch Set: delete storage for physical origin Created 4 years 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 | « no previous file | content/browser/dom_storage/local_storage_context_mojo.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/dom_storage/local_storage_context_mojo.h
diff --git a/content/browser/dom_storage/local_storage_context_mojo.h b/content/browser/dom_storage/local_storage_context_mojo.h
index 9f648d19f3e826cf3c7507d430abbfe6f32508ab..c6fea56a4b85a123fca2005affad8a2e6b47b0f5 100644
--- a/content/browser/dom_storage/local_storage_context_mojo.h
+++ b/content/browser/dom_storage/local_storage_context_mojo.h
@@ -37,6 +37,9 @@ class CONTENT_EXPORT LocalStorageContextMojo {
void OpenLocalStorage(const url::Origin& origin,
mojom::LevelDBWrapperRequest request);
void GetStorageUsage(GetStorageUsageCallback callback);
+ void DeleteStorage(const url::Origin& origin);
+ // Like DeleteStorage(), but also deletes storage for all sub-origins.
+ void DeleteStorageForPhysicalOrigin(const url::Origin& origin);
void SetDatabaseForTesting(leveldb::mojom::LevelDBDatabasePtr database);
@@ -63,6 +66,7 @@ class CONTENT_EXPORT LocalStorageContextMojo {
// directly from that function, or through |on_database_open_callbacks_|.
void BindLocalStorage(const url::Origin& origin,
mojom::LevelDBWrapperRequest request);
+ LevelDBWrapperImpl* GetOrCreateDBWrapper(const url::Origin& origin);
// The (possibly delayed) implementation of GetStorageUsage(). Can be called
// directly from that function, or through |on_database_open_callbacks_|.
@@ -71,6 +75,10 @@ class CONTENT_EXPORT LocalStorageContextMojo {
leveldb::mojom::DatabaseError status,
std::vector<leveldb::mojom::KeyValuePtr> data);
+ void OnGotStorageUsageForDeletePhysicalOrigin(
+ const url::Origin& origin,
+ std::vector<LocalStorageUsageInfo> usage);
+
service_manager::Connector* const connector_;
const base::FilePath subdirectory_;
« no previous file with comments | « no previous file | content/browser/dom_storage/local_storage_context_mojo.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698