| Index: content/browser/in_process_webkit/dom_storage_namespace.h
|
| diff --git a/content/browser/in_process_webkit/dom_storage_namespace.h b/content/browser/in_process_webkit/dom_storage_namespace.h
|
| index 1a6f1245ca35a5fc26dbceed445026288ba3933d..5fa8aeff9066978f3603db1193382c82f327baad 100644
|
| --- a/content/browser/in_process_webkit/dom_storage_namespace.h
|
| +++ b/content/browser/in_process_webkit/dom_storage_namespace.h
|
| @@ -31,7 +31,8 @@ class DOMStorageNamespace {
|
|
|
| ~DOMStorageNamespace();
|
|
|
| - DOMStorageArea* GetStorageArea(const string16& origin);
|
| + DOMStorageArea* GetStorageArea(const string16& origin,
|
| + bool enforce_session_only_storage);
|
| DOMStorageNamespace* Copy(int64 clone_namespace_id);
|
|
|
| void PurgeMemory();
|
| @@ -57,6 +58,21 @@ class DOMStorageNamespace {
|
| // Creates the underlying WebStorageNamespace on demand.
|
| void CreateWebStorageNamespaceIfNecessary();
|
|
|
| + // Helpers for creating DOMStorageAreas.
|
| + DOMStorageArea* GetExistingStorageArea(const string16& origin);
|
| + DOMStorageArea* CreateStorageArea(const string16& origin);
|
| +
|
| + // Returns true if this DOMStorageNamespace represents localStorage and should
|
| + // have a pointer to a session-only localStorage DOMStorageNamespace (which is
|
| + // lazily created). Returns false if this DOMStorageNamespace is a
|
| + // sessionStorage, or a session-only localStorage, or a localStorage
|
| + // associated with an off the record profile.
|
| + bool ShouldHaveSessionOnlyLocalStorage() const;
|
| +
|
| + // Lazy creation of the DOMStorageNamespace representing session-only
|
| + // localStorage.
|
| + void EnsureSessionOnlyLocalStorageCreated();
|
| +
|
| // All the storage areas we own.
|
| typedef base::hash_map<string16, DOMStorageArea*> OriginToStorageAreaMap;
|
| OriginToStorageAreaMap origin_to_storage_area_;
|
| @@ -77,6 +93,9 @@ class DOMStorageNamespace {
|
| // SessionStorage vs. LocalStorage.
|
| const DOMStorageType dom_storage_type_;
|
|
|
| + // Session-only version of the same localStorage (lazily created).
|
| + scoped_ptr<DOMStorageNamespace> session_only_local_storage_;
|
| +
|
| DISALLOW_IMPLICIT_CONSTRUCTORS(DOMStorageNamespace);
|
| };
|
|
|
|
|