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

Unified Diff: webkit/dom_storage/session_storage_database.h

Issue 9963107: Persist sessionStorage on disk. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Test update. Created 8 years, 7 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
Index: webkit/dom_storage/session_storage_database.h
diff --git a/webkit/dom_storage/session_storage_database.h b/webkit/dom_storage/session_storage_database.h
index 5b427fd8510a8b97f055d66c32965389eb482485..70409265d9e54b92cf6c9ac011590a85bd13fcdc 100644
--- a/webkit/dom_storage/session_storage_database.h
+++ b/webkit/dom_storage/session_storage_database.h
@@ -54,14 +54,17 @@ class SessionStorageDatabase :
// Creates shallow copies of the areas for |namespace_id| and associates them
// with |new_namespace_id|.
- bool CloneNamespace(int64 namespace_id, int64 new_namespace_id);
+ void CloneNamespace(int64 namespace_id, int64 new_namespace_id);
// Deletes the data for |namespace_id| and |origin|.
- bool DeleteArea(int64 namespace_id, const GURL& origin);
+ void DeleteArea(int64 namespace_id, const GURL& origin);
// Deletes the data for |namespace_id|.
bool DeleteNamespace(int64 namespace_id);
+ // Reads all namespace ids from the database.
+ bool ReadNamespaceIds(std::vector<int64>* namespace_ids);
+
private:
friend class base::RefCountedThreadSafe<SessionStorageDatabase>;
friend class SessionStorageDatabaseTest;
@@ -108,12 +111,12 @@ class SessionStorageDatabase :
leveldb::WriteBatch* batch);
// Helpers for deleting data for |namespace_id| and |origin|.
- bool DeleteArea(int64 namespace_id,
- const std::string& origin,
- leveldb::WriteBatch* batch);
- bool DeleteArea(const std::string& namespace_id_str,
- const std::string& origin,
- leveldb::WriteBatch* batch);
+ bool DeleteAreaHelper(int64 namespace_id,
+ const std::string& origin,
+ leveldb::WriteBatch* batch);
+ bool DeleteAreaHelper(const std::string& namespace_id_str,
+ const std::string& origin,
+ leveldb::WriteBatch* batch);
// Retrieves the map id for |namespace_id| and |origin|. It's not an error if
// the map doesn't exist.

Powered by Google App Engine
This is Rietveld 408576698