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 5230f370c4a3805c370bd130918f87cd265184a7..02446bbc68f82820bcebb352a2b2d3a9fd6e2344 100644 |
--- a/webkit/dom_storage/session_storage_database.h |
+++ b/webkit/dom_storage/session_storage_database.h |
@@ -44,7 +44,9 @@ class SessionStorageDatabase : |
// Updates the data for |namespace_id| and |origin|. Will remove all keys |
// before updating the database if |clear_all_first| is set. Then all entries |
// in |changes| will be examined - keys mapped to a null NullableString16 will |
- // be removed and all others will be inserted/updated as appropriate. |
+ // be removed and all others will be inserted/updated as appropriate. It is |
+ // allowed to write data into a shallow copy created by CloneNamespace, and in |
+ // that case the copy will be made deep before writing the values. |
bool CommitAreaChanges(int64 namespace_id, |
const GURL& origin, |
bool clear_all_first, |
@@ -158,6 +160,15 @@ class SessionStorageDatabase : |
// Deletes all values in |map_id|. |
bool ClearMap(const std::string& map_id, leveldb::WriteBatch* batch); |
+ // Breaks the association between (|namespace_id|, |origin|) and |map_id| and |
+ // creates a new map for (|namespace_id|, |origin|). Copies the data from the |
+ // old map if |copy_data| is true. |
+ bool DeepCopyArea(int64 namespace_id, |
+ const GURL& origin, |
+ bool copy_data, |
+ std::string* map_id, |
+ leveldb::WriteBatch* batch); |
+ |
// Helper functions for creating the keys needed for the schema. |
static std::string NamespaceStartKey(const std::string& namespace_id_str); |
static std::string NamespaceStartKey(int64 namespace_id, |