| Index: webkit/dom_storage/dom_storage_area.h
|
| diff --git a/webkit/dom_storage/dom_storage_area.h b/webkit/dom_storage/dom_storage_area.h
|
| index af43c821a4e206cb20e0670d12db6343a315d64c..be99ba9258d82028cca65be5a731b3b9e5071612 100644
|
| --- a/webkit/dom_storage/dom_storage_area.h
|
| +++ b/webkit/dom_storage/dom_storage_area.h
|
| @@ -9,16 +9,19 @@
|
| #include "base/file_path.h"
|
| #include "base/gtest_prod_util.h"
|
| #include "base/memory/ref_counted.h"
|
| +#include "base/memory/scoped_ptr.h"
|
| #include "base/nullable_string16.h"
|
| #include "base/string16.h"
|
| #include "googleurl/src/gurl.h"
|
| -#include "webkit/dom_storage/dom_storage_database.h"
|
| +#include "webkit/dom_storage/dom_storage_database_adapter.h"
|
| #include "webkit/dom_storage/dom_storage_types.h"
|
|
|
| namespace dom_storage {
|
|
|
| +class DomStorageDatabaseAdapter;
|
| class DomStorageMap;
|
| class DomStorageTaskRunner;
|
| +class SessionStorageDatabase;
|
|
|
| // Container for a per-origin Map of key/value pairs potentially
|
| // backed by storage on disk and lazily commits changes to disk.
|
| @@ -31,11 +34,18 @@ class DomStorageArea
|
| static FilePath DatabaseFileNameFromOrigin(const GURL& origin);
|
| static GURL OriginFromDatabaseFileName(const FilePath& file_name);
|
|
|
| + // Local storage. Backed on disk if directory is nonempty.
|
| DomStorageArea(int64 namespace_id,
|
| const GURL& origin,
|
| const FilePath& directory,
|
| DomStorageTaskRunner* task_runner);
|
|
|
| + // Session storage. Backed on disk if |session_storage_backing| is not NULL.
|
| + DomStorageArea(int64 namespace_id,
|
| + const GURL& origin,
|
| + SessionStorageDatabase* session_storage_backing,
|
| + DomStorageTaskRunner* task_runner);
|
| +
|
| const GURL& origin() const { return origin_; }
|
| int64 namespace_id() const { return namespace_id_; }
|
|
|
| @@ -108,7 +118,8 @@ class DomStorageArea
|
| FilePath directory_;
|
| scoped_refptr<DomStorageTaskRunner> task_runner_;
|
| scoped_refptr<DomStorageMap> map_;
|
| - scoped_ptr<DomStorageDatabase> backing_;
|
| + scoped_ptr<DomStorageDatabaseAdapter> backing_;
|
| + scoped_refptr<SessionStorageDatabase> session_storage_backing_;
|
| bool is_initial_import_done_;
|
| bool is_shutdown_;
|
| scoped_ptr<CommitBatch> commit_batch_;
|
|
|