Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef WEBKIT_DOM_STORAGE_DOM_STORAGE_AREA_H_ | 5 #ifndef WEBKIT_DOM_STORAGE_DOM_STORAGE_AREA_H_ |
| 6 #define WEBKIT_DOM_STORAGE_DOM_STORAGE_AREA_H_ | 6 #define WEBKIT_DOM_STORAGE_DOM_STORAGE_AREA_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include "base/file_path.h" | 9 #include "base/file_path.h" |
| 10 #include "base/gtest_prod_util.h" | 10 #include "base/gtest_prod_util.h" |
| 11 #include "base/memory/ref_counted.h" | 11 #include "base/memory/ref_counted.h" |
| 12 #include "base/memory/scoped_ptr.h" | |
| 12 #include "base/nullable_string16.h" | 13 #include "base/nullable_string16.h" |
| 13 #include "base/string16.h" | 14 #include "base/string16.h" |
| 14 #include "googleurl/src/gurl.h" | 15 #include "googleurl/src/gurl.h" |
| 15 #include "webkit/dom_storage/dom_storage_database.h" | 16 #include "webkit/dom_storage/dom_storage_database_adapter.h" |
| 16 #include "webkit/dom_storage/dom_storage_types.h" | 17 #include "webkit/dom_storage/dom_storage_types.h" |
| 17 | 18 |
| 18 namespace dom_storage { | 19 namespace dom_storage { |
| 19 | 20 |
| 21 class DomStorageDatabaseAdapter; | |
|
michaeln
2012/06/15 19:02:43
either the #include or this forward isn't really n
marja
2012/06/19 10:43:30
Done (forward declaration is enough).
| |
| 20 class DomStorageMap; | 22 class DomStorageMap; |
| 21 class DomStorageTaskRunner; | 23 class DomStorageTaskRunner; |
| 22 | 24 |
| 23 // Container for a per-origin Map of key/value pairs potentially | 25 // Container for a per-origin Map of key/value pairs potentially |
| 24 // backed by storage on disk and lazily commits changes to disk. | 26 // backed by storage on disk and lazily commits changes to disk. |
| 25 // See class comments for DomStorageContext for a larger overview. | 27 // See class comments for DomStorageContext for a larger overview. |
| 26 class DomStorageArea | 28 class DomStorageArea |
| 27 : public base::RefCountedThreadSafe<DomStorageArea> { | 29 : public base::RefCountedThreadSafe<DomStorageArea> { |
| 28 | 30 |
| 29 public: | 31 public: |
| (...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 101 void CommitChanges(const CommitBatch* commit_batch); | 103 void CommitChanges(const CommitBatch* commit_batch); |
| 102 void OnCommitComplete(); | 104 void OnCommitComplete(); |
| 103 | 105 |
| 104 void ShutdownInCommitSequence(); | 106 void ShutdownInCommitSequence(); |
| 105 | 107 |
| 106 int64 namespace_id_; | 108 int64 namespace_id_; |
| 107 GURL origin_; | 109 GURL origin_; |
| 108 FilePath directory_; | 110 FilePath directory_; |
| 109 scoped_refptr<DomStorageTaskRunner> task_runner_; | 111 scoped_refptr<DomStorageTaskRunner> task_runner_; |
| 110 scoped_refptr<DomStorageMap> map_; | 112 scoped_refptr<DomStorageMap> map_; |
| 111 scoped_ptr<DomStorageDatabase> backing_; | 113 scoped_ptr<DomStorageDatabaseAdapter> backing_; |
| 112 bool is_initial_import_done_; | 114 bool is_initial_import_done_; |
| 113 bool is_shutdown_; | 115 bool is_shutdown_; |
| 114 scoped_ptr<CommitBatch> commit_batch_; | 116 scoped_ptr<CommitBatch> commit_batch_; |
| 115 int commit_batches_in_flight_; | 117 int commit_batches_in_flight_; |
| 116 }; | 118 }; |
| 117 | 119 |
| 118 } // namespace dom_storage | 120 } // namespace dom_storage |
| 119 | 121 |
| 120 #endif // WEBKIT_DOM_STORAGE_DOM_STORAGE_AREA_H_ | 122 #endif // WEBKIT_DOM_STORAGE_DOM_STORAGE_AREA_H_ |
| OLD | NEW |