Chromium Code Reviews| 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..33c1640b713d9a185125cc1c1930bbe6a1acb8fc 100644 |
| --- a/webkit/dom_storage/dom_storage_area.h |
| +++ b/webkit/dom_storage/dom_storage_area.h |
| @@ -31,11 +31,18 @@ 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(int64 namespace_id, |
|
michaeln
2012/06/14 22:53:48
Can we remove the namespace_id param from this cto
marja
2012/06/15 09:17:42
Done.
|
| const GURL& origin, |
| const FilePath& directory, |
| DomStorageTaskRunner* task_runner); |
| + // Session storage. |
| + DomStorageArea(int64 namespace_id, |
| + const std::string& persistent_namespace_id, |
| + const GURL& origin, |
| + DomStorageTaskRunner* task_runner); |
| + |
| const GURL& origin() const { return origin_; } |
| int64 namespace_id() const { return namespace_id_; } |
| @@ -50,7 +57,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 +86,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 +114,7 @@ class DomStorageArea |
| void ShutdownInCommitSequence(); |
| int64 namespace_id_; |
| + std::string persistent_namespace_id_; |
| GURL origin_; |
| FilePath directory_; |
| scoped_refptr<DomStorageTaskRunner> task_runner_; |