| 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 d0b09a77a57b6b246cbbd6f9aab2e5dffc9eb2bf..38ff1e94e6b161dff63eaa162b81b7c1ddee7f73 100644
|
| --- a/webkit/dom_storage/dom_storage_area.h
|
| +++ b/webkit/dom_storage/dom_storage_area.h
|
| @@ -12,6 +12,7 @@
|
| #include "base/memory/scoped_ptr.h"
|
| #include "base/nullable_string16.h"
|
| #include "base/string16.h"
|
| +#include "base/synchronization/lock.h"
|
| #include "googleurl/src/gurl.h"
|
| #include "webkit/dom_storage/dom_storage_types.h"
|
|
|
| @@ -20,6 +21,7 @@ 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.
|
| @@ -37,10 +39,11 @@ class DomStorageArea
|
| const FilePath& directory,
|
| DomStorageTaskRunner* task_runner);
|
|
|
| - // Session storage.
|
| + // Session storage. Backed on disk if |session_storage_backing| is not NULL.
|
| DomStorageArea(int64 namespace_id,
|
| const std::string& persistent_namespace_id,
|
| const GURL& origin,
|
| + SessionStorageDatabase* session_storage_backing,
|
| DomStorageTaskRunner* task_runner);
|
|
|
| const GURL& origin() const { return origin_; }
|
| @@ -111,6 +114,8 @@ class DomStorageArea
|
| void CommitChanges(const CommitBatch* commit_batch);
|
| void OnCommitComplete();
|
|
|
| + void DeleteOriginInCommitSequence();
|
| +
|
| void ShutdownInCommitSequence();
|
|
|
| int64 namespace_id_;
|
| @@ -120,10 +125,16 @@ class DomStorageArea
|
| scoped_refptr<DomStorageTaskRunner> task_runner_;
|
| scoped_refptr<DomStorageMap> map_;
|
| scoped_ptr<DomStorageDatabaseAdapter> backing_;
|
| + scoped_refptr<SessionStorageDatabase> session_storage_backing_;
|
| bool is_initial_import_done_;
|
| bool is_shutdown_;
|
| scoped_ptr<CommitBatch> commit_batch_;
|
| int commit_batches_in_flight_;
|
| +
|
| + // |deletion_in_progress_| is true if the data is getting deleted because of a
|
| + // |DeleteOrigin call. |deletion_in_progress_lock_| guards it.
|
| + bool deletion_in_progress_;
|
| + base::Lock deletion_in_progress_lock_;
|
| };
|
|
|
| } // namespace dom_storage
|
|
|