| 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..db4d691cd0a92d38874bfc3ac1dce7642c45c831 100644
|
| --- a/content/browser/in_process_webkit/dom_storage_namespace.h
|
| +++ b/content/browser/in_process_webkit/dom_storage_namespace.h
|
| @@ -16,6 +16,10 @@ class DOMStorageArea;
|
| class DOMStorageContext;
|
| class FilePath;
|
|
|
| +namespace IPC {
|
| +class Message;
|
| +}
|
| +
|
| namespace WebKit {
|
| class WebStorageArea;
|
| class WebStorageNamespace;
|
| @@ -24,6 +28,12 @@ class WebStorageNamespace;
|
| // Only to be used on the WebKit thread.
|
| class DOMStorageNamespace {
|
| public:
|
| + class Delegate {
|
| + public:
|
| + virtual void OnGotStorageArea(DOMStorageArea* storage_area,
|
| + IPC::Message* reply_msg) = 0;
|
| + };
|
| +
|
| static DOMStorageNamespace* CreateLocalStorageNamespace(
|
| DOMStorageContext* dom_storage_context, const FilePath& data_dir_path);
|
| static DOMStorageNamespace* CreateSessionStorageNamespace(
|
| @@ -31,7 +41,10 @@ class DOMStorageNamespace {
|
|
|
| ~DOMStorageNamespace();
|
|
|
| - DOMStorageArea* GetStorageArea(const string16& origin);
|
| + DOMStorageArea* GetStorageArea(const string16& origin,
|
| + DOMStorageNamespace::Delegate* delegate,
|
| + IPC::Message* reply_msg);
|
| +
|
| DOMStorageNamespace* Copy(int64 clone_namespace_id);
|
|
|
| void PurgeMemory();
|
| @@ -47,6 +60,12 @@ class DOMStorageNamespace {
|
| // by an owned DOMStorageArea.
|
| WebKit::WebStorageArea* CreateWebStorageArea(const string16& origin);
|
|
|
| + // Helpers for creating DOMStorageAreas.
|
| + DOMStorageArea* GetExistingStorageArea(const string16& origin);
|
| + DOMStorageArea* CreateStorageAreaInWebKitThread(const string16& origin,
|
| + bool allow_permanent_storage,
|
| + Delegate* delegate,
|
| + IPC::Message* reply_msg);
|
| private:
|
| // Called by the static factory methods above.
|
| DOMStorageNamespace(DOMStorageContext* dom_storage_context,
|
| @@ -77,6 +96,12 @@ class DOMStorageNamespace {
|
| // SessionStorage vs. LocalStorage.
|
| const DOMStorageType dom_storage_type_;
|
|
|
| + // A LocalStorage namespace holds a pointer to a session-only LocalStorage
|
| + // namespace. NULL if this DOMStorageNamespace is a SessionStorage, or a
|
| + // session-only LocalStorage, or a LocalStorage associated with an off the
|
| + // record profile.
|
| + scoped_ptr<DOMStorageNamespace> session_only_local_storage_;
|
| +
|
| DISALLOW_IMPLICIT_CONSTRUCTORS(DOMStorageNamespace);
|
| };
|
|
|
|
|