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_NAMESPACE_H_ | 5 #ifndef WEBKIT_DOM_STORAGE_DOM_STORAGE_NAMESPACE_H_ |
6 #define WEBKIT_DOM_STORAGE_DOM_STORAGE_NAMESPACE_H_ | 6 #define WEBKIT_DOM_STORAGE_DOM_STORAGE_NAMESPACE_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 | 9 |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
11 #include "base/file_path.h" | 11 #include "base/file_path.h" |
12 #include "base/memory/ref_counted.h" | 12 #include "base/memory/ref_counted.h" |
| 13 #include "webkit/dom_storage/dom_storage_export.h" |
13 | 14 |
14 class GURL; | 15 class GURL; |
15 | 16 |
16 namespace dom_storage { | 17 namespace dom_storage { |
17 | 18 |
18 class DomStorageArea; | 19 class DomStorageArea; |
19 class DomStorageTaskRunner; | 20 class DomStorageTaskRunner; |
20 class SessionStorageDatabase; | 21 class SessionStorageDatabase; |
21 | 22 |
22 // Container for the set of per-origin Areas. | 23 // Container for the set of per-origin Areas. |
23 // See class comments for DomStorageContext for a larger overview. | 24 // See class comments for DomStorageContext for a larger overview. |
24 class DomStorageNamespace | 25 class DOM_STORAGE_EXPORT DomStorageNamespace |
25 : public base::RefCountedThreadSafe<DomStorageNamespace> { | 26 : public base::RefCountedThreadSafe<DomStorageNamespace> { |
26 public: | 27 public: |
27 // Constructor for a LocalStorage namespace with id of 0 | 28 // Constructor for a LocalStorage namespace with id of 0 |
28 // and an optional backing directory on disk. | 29 // and an optional backing directory on disk. |
29 DomStorageNamespace(const FilePath& directory, // may be empty | 30 DomStorageNamespace(const FilePath& directory, // may be empty |
30 DomStorageTaskRunner* task_runner); | 31 DomStorageTaskRunner* task_runner); |
31 | 32 |
32 // Constructor for a SessionStorage namespace with a non-zero id and an | 33 // Constructor for a SessionStorage namespace with a non-zero id and an |
33 // optional backing on disk via |session_storage_database| (may be NULL). | 34 // optional backing on disk via |session_storage_database| (may be NULL). |
34 DomStorageNamespace(int64 namespace_id, | 35 DomStorageNamespace(int64 namespace_id, |
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
84 FilePath directory_; | 85 FilePath directory_; |
85 AreaMap areas_; | 86 AreaMap areas_; |
86 scoped_refptr<DomStorageTaskRunner> task_runner_; | 87 scoped_refptr<DomStorageTaskRunner> task_runner_; |
87 scoped_refptr<SessionStorageDatabase> session_storage_database_; | 88 scoped_refptr<SessionStorageDatabase> session_storage_database_; |
88 }; | 89 }; |
89 | 90 |
90 } // namespace dom_storage | 91 } // namespace dom_storage |
91 | 92 |
92 | 93 |
93 #endif // WEBKIT_DOM_STORAGE_DOM_STORAGE_NAMESPACE_H_ | 94 #endif // WEBKIT_DOM_STORAGE_DOM_STORAGE_NAMESPACE_H_ |
OLD | NEW |