Index: webkit/dom_storage/dom_storage_context.h |
diff --git a/webkit/dom_storage/dom_storage_context.h b/webkit/dom_storage/dom_storage_context.h |
index c7d57a368b6d1931da0dbf9d3ee220817eff5606..73459acdf38cbb52b2cd171d4406c2eb46b0e012 100644 |
--- a/webkit/dom_storage/dom_storage_context.h |
+++ b/webkit/dom_storage/dom_storage_context.h |
@@ -7,6 +7,7 @@ |
#pragma once |
#include <map> |
+#include <set> |
#include <vector> |
#include "base/atomic_sequence_num.h" |
@@ -35,6 +36,7 @@ class DomStorageArea; |
class DomStorageNamespace; |
class DomStorageSession; |
class DomStorageTaskRunner; |
+class SessionStorageDatabase; |
// The Context is the root of an object containment hierachy for |
// Namespaces and Areas related to the owning profile. |
@@ -151,10 +153,16 @@ class DomStorageContext |
return session_id_sequence_.GetNext(); |
} |
+ std::string AllocatePersistentSessionId(); |
+ |
// Must be called on the background thread. |
- void CreateSessionNamespace(int64 namespace_id); |
+ void CreateSessionNamespace(int64 namespace_id, |
+ const std::string& persistent_namespace_id); |
void DeleteSessionNamespace(int64 namespace_id); |
- void CloneSessionNamespace(int64 existing_id, int64 new_id); |
+ void CloneSessionNamespace(int64 existing_id, int64 new_id, |
+ const std::string& new_persistent_id); |
+ |
+ void DoomSessionStorage(const std::string& persistent_namespace_id); |
private: |
friend class DomStorageContextTest; |
@@ -167,6 +175,8 @@ class DomStorageContext |
void ClearSessionOnlyOrigins(); |
+ void DeleteLeftoverDataInCommitSequence(); |
+ |
// Collection of namespaces keyed by id. |
StorageNamespaceMap namespaces_; |
@@ -191,6 +201,15 @@ class DomStorageContext |
bool is_shutdown_; |
bool force_keep_session_state_; |
scoped_refptr<quota::SpecialStoragePolicy> special_storage_policy_; |
+ scoped_refptr<SessionStorageDatabase> session_storage_database_; |
+ |
+ // Persistent namespace IDs for sessionStorages which won't be needed for |
+ // session restore. |
+ std::set<std::string> doomed_persistent_session_ids_; |
+ |
+ // Persistent namespace IDs to protect from leftover data deletion (they will |
+ // be needed for session restore). |
+ std::set<std::string> protected_persistent_session_ids_; |
}; |
} // namespace dom_storage |