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_CONTEXT_H_ | 5 #ifndef WEBKIT_DOM_STORAGE_DOM_STORAGE_CONTEXT_H_ |
6 #define WEBKIT_DOM_STORAGE_DOM_STORAGE_CONTEXT_H_ | 6 #define WEBKIT_DOM_STORAGE_DOM_STORAGE_CONTEXT_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <map> | 9 #include <map> |
10 #include <vector> | 10 #include <vector> |
(...skipping 17 matching lines...) Expand all Loading... |
28 namespace quota { | 28 namespace quota { |
29 class SpecialStoragePolicy; | 29 class SpecialStoragePolicy; |
30 } | 30 } |
31 | 31 |
32 namespace dom_storage { | 32 namespace dom_storage { |
33 | 33 |
34 class DomStorageArea; | 34 class DomStorageArea; |
35 class DomStorageNamespace; | 35 class DomStorageNamespace; |
36 class DomStorageSession; | 36 class DomStorageSession; |
37 class DomStorageTaskRunner; | 37 class DomStorageTaskRunner; |
| 38 class SessionStorageDatabase; |
38 | 39 |
39 // The Context is the root of an object containment hierachy for | 40 // The Context is the root of an object containment hierachy for |
40 // Namespaces and Areas related to the owning profile. | 41 // Namespaces and Areas related to the owning profile. |
41 // One instance is allocated in the main process for each profile, | 42 // One instance is allocated in the main process for each profile, |
42 // instance methods should be called serially in the background as | 43 // instance methods should be called serially in the background as |
43 // determined by the task_runner. Specifcally not on chrome's non-blocking | 44 // determined by the task_runner. Specifcally not on chrome's non-blocking |
44 // IO thread since these methods can result in blocking file io. | 45 // IO thread since these methods can result in blocking file io. |
45 // | 46 // |
46 // In general terms, the DomStorage object relationships are... | 47 // In general terms, the DomStorage object relationships are... |
47 // Contexts (per-profile) own Namespaces which own Areas which share Maps. | 48 // Contexts (per-profile) own Namespaces which own Areas which share Maps. |
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
170 ObserverList<EventObserver> event_observers_; | 171 ObserverList<EventObserver> event_observers_; |
171 | 172 |
172 // We use a 32 bit identifier for per tab storage sessions. | 173 // We use a 32 bit identifier for per tab storage sessions. |
173 // At a tab per second, this range is large enough for 68 years. | 174 // At a tab per second, this range is large enough for 68 years. |
174 base::AtomicSequenceNumber session_id_sequence_; | 175 base::AtomicSequenceNumber session_id_sequence_; |
175 | 176 |
176 bool is_shutdown_; | 177 bool is_shutdown_; |
177 bool clear_local_state_; | 178 bool clear_local_state_; |
178 bool save_session_state_; | 179 bool save_session_state_; |
179 scoped_refptr<quota::SpecialStoragePolicy> special_storage_policy_; | 180 scoped_refptr<quota::SpecialStoragePolicy> special_storage_policy_; |
| 181 scoped_refptr<SessionStorageDatabase> session_storage_database_; |
180 }; | 182 }; |
181 | 183 |
182 } // namespace dom_storage | 184 } // namespace dom_storage |
183 | 185 |
184 #endif // WEBKIT_DOM_STORAGE_DOM_STORAGE_CONTEXT_H_ | 186 #endif // WEBKIT_DOM_STORAGE_DOM_STORAGE_CONTEXT_H_ |
OLD | NEW |