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

Unified Diff: webkit/dom_storage/dom_storage_area.h

Issue 10546167: Create and store persistent unique ids for sessionStorage. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: code review Created 8 years, 6 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/public/browser/session_storage_namespace.h ('k') | webkit/dom_storage/dom_storage_area.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/dom_storage/dom_storage_area.h
diff --git a/webkit/dom_storage/dom_storage_area.h b/webkit/dom_storage/dom_storage_area.h
index af43c821a4e206cb20e0670d12db6343a315d64c..8b5a6c31d1e6ef9cae170a197197800d463ee5f8 100644
--- a/webkit/dom_storage/dom_storage_area.h
+++ b/webkit/dom_storage/dom_storage_area.h
@@ -31,9 +31,15 @@ class DomStorageArea
static FilePath DatabaseFileNameFromOrigin(const GURL& origin);
static GURL OriginFromDatabaseFileName(const FilePath& file_name);
+ // Local storage. Backed on disk if directory is nonempty.
+ DomStorageArea(const GURL& origin,
+ const FilePath& directory,
+ DomStorageTaskRunner* task_runner);
+
+ // Session storage.
DomStorageArea(int64 namespace_id,
+ const std::string& persistent_namespace_id,
const GURL& origin,
- const FilePath& directory,
DomStorageTaskRunner* task_runner);
const GURL& origin() const { return origin_; }
@@ -50,7 +56,9 @@ class DomStorageArea
bool RemoveItem(const string16& key, string16* old_value);
bool Clear();
- DomStorageArea* ShallowCopy(int64 destination_namespace_id);
+ DomStorageArea* ShallowCopy(
+ int64 destination_namespace_id,
+ const std::string& destination_persistent_namespace_id);
bool HasUncommittedChanges() const;
@@ -77,6 +85,7 @@ class DomStorageArea
FRIEND_TEST_ALL_PREFIXES(DomStorageAreaTest, CommitChangesAtShutdown);
FRIEND_TEST_ALL_PREFIXES(DomStorageAreaTest, DeleteOrigin);
FRIEND_TEST_ALL_PREFIXES(DomStorageAreaTest, PurgeMemory);
+ FRIEND_TEST_ALL_PREFIXES(DomStorageContextTest, PersistentIds);
friend class base::RefCountedThreadSafe<DomStorageArea>;
struct CommitBatch {
@@ -104,6 +113,7 @@ class DomStorageArea
void ShutdownInCommitSequence();
int64 namespace_id_;
+ std::string persistent_namespace_id_;
GURL origin_;
FilePath directory_;
scoped_refptr<DomStorageTaskRunner> task_runner_;
« no previous file with comments | « content/public/browser/session_storage_namespace.h ('k') | webkit/dom_storage/dom_storage_area.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698