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 343d73750f36bd089d59a7788adbc6fa1c594053..44244941c22de36e34dde651f4d3a5be05f862f5 100644 |
--- a/content/browser/in_process_webkit/dom_storage_namespace.h |
+++ b/content/browser/in_process_webkit/dom_storage_namespace.h |
@@ -6,6 +6,7 @@ |
#define CONTENT_BROWSER_IN_PROCESS_WEBKIT_DOM_STORAGE_NAMESPACE_H_ |
#pragma once |
+#include "base/file_path.h" |
#include "base/hash_tables.h" |
#include "base/memory/scoped_ptr.h" |
#include "base/string16.h" |
@@ -27,7 +28,8 @@ class DOMStorageNamespace { |
static DOMStorageNamespace* CreateLocalStorageNamespace( |
DOMStorageContext* dom_storage_context, const FilePath& data_dir_path); |
static DOMStorageNamespace* CreateSessionStorageNamespace( |
- DOMStorageContext* dom_storage_context, int64 namespace_id); |
+ DOMStorageContext* dom_storage_context, const FilePath& data_dir_path, |
+ int64 namespace_id); |
~DOMStorageNamespace(); |
@@ -42,15 +44,21 @@ class DOMStorageNamespace { |
int64 id() const { return id_; } |
const WebKit::WebString& data_dir_path() const { return data_dir_path_; } |
DOMStorageType dom_storage_type() const { return dom_storage_type_; } |
+ FilePath session_storage_directory() const { |
+ return session_storage_directory_; |
+ } |
// Creates a WebStorageArea for the given origin. This should only be called |
// by an owned DOMStorageArea. |
WebKit::WebStorageArea* CreateWebStorageArea(const string16& origin); |
+ void CopyDataTo(DOMStorageNamespace* other); |
+ |
private: |
// Called by the static factory methods above. |
DOMStorageNamespace(DOMStorageContext* dom_storage_context, |
int64 id, |
+ const FilePath& session_storage_directory, |
const WebKit::WebString& data_dir_path, |
DOMStorageType storage_type); |
@@ -70,6 +78,10 @@ class DOMStorageNamespace { |
// Our id. Unique to our parent WebKitContext class. |
int64 id_; |
+ // Identifies the directory where the sessionStorage databases reside. Empty |
+ // for localStorage. |
+ FilePath session_storage_directory_; |
+ |
// The path used to create us, so we can recreate our WebStorageNamespace on |
// demand. |
WebKit::WebString data_dir_path_; |
@@ -80,4 +92,13 @@ class DOMStorageNamespace { |
DISALLOW_IMPLICIT_CONSTRUCTORS(DOMStorageNamespace); |
}; |
+struct SessionStorageCreatedDetails { |
+ int64 id; |
+ FilePath session_storage_directory; |
+ SessionStorageCreatedDetails(); |
+ SessionStorageCreatedDetails(int64 id, |
+ const FilePath& session_storage_directory); |
+ ~SessionStorageCreatedDetails(); |
+}; |
+ |
#endif // CONTENT_BROWSER_IN_PROCESS_WEBKIT_DOM_STORAGE_NAMESPACE_H_ |