| 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 CONTENT_BROWSER_DOM_STORAGE_DOM_STORAGE_CONTEXT_IMPL_H_ | 5 #ifndef CONTENT_BROWSER_DOM_STORAGE_DOM_STORAGE_CONTEXT_IMPL_H_ |
| 6 #define CONTENT_BROWSER_DOM_STORAGE_DOM_STORAGE_CONTEXT_IMPL_H_ | 6 #define CONTENT_BROWSER_DOM_STORAGE_DOM_STORAGE_CONTEXT_IMPL_H_ |
| 7 | 7 |
| 8 #include <map> | 8 #include <map> |
| 9 #include <set> | 9 #include <set> |
| 10 #include <string> | 10 #include <string> |
| (...skipping 187 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 198 | 198 |
| 199 // Where sessionstorage data is stored, maybe empty for the incognito use | 199 // Where sessionstorage data is stored, maybe empty for the incognito use |
| 200 // case. Always empty until the file-backed session storage feature is | 200 // case. Always empty until the file-backed session storage feature is |
| 201 // implemented. | 201 // implemented. |
| 202 base::FilePath sessionstorage_directory_; | 202 base::FilePath sessionstorage_directory_; |
| 203 | 203 |
| 204 // Used to schedule sequenced background tasks. | 204 // Used to schedule sequenced background tasks. |
| 205 scoped_refptr<DOMStorageTaskRunner> task_runner_; | 205 scoped_refptr<DOMStorageTaskRunner> task_runner_; |
| 206 | 206 |
| 207 // List of objects observing local storage events. | 207 // List of objects observing local storage events. |
| 208 ObserverList<EventObserver> event_observers_; | 208 base::ObserverList<EventObserver> event_observers_; |
| 209 | 209 |
| 210 // We use a 32 bit identifier for per tab storage sessions. | 210 // We use a 32 bit identifier for per tab storage sessions. |
| 211 // At a tab per second, this range is large enough for 68 years. | 211 // At a tab per second, this range is large enough for 68 years. |
| 212 // The offset is to more quickly detect the error condition where | 212 // The offset is to more quickly detect the error condition where |
| 213 // an id related to one context is mistakenly used in another. | 213 // an id related to one context is mistakenly used in another. |
| 214 base::AtomicSequenceNumber session_id_sequence_; | 214 base::AtomicSequenceNumber session_id_sequence_; |
| 215 const int session_id_offset_; | 215 const int session_id_offset_; |
| 216 | 216 |
| 217 bool is_shutdown_; | 217 bool is_shutdown_; |
| 218 bool force_keep_session_state_; | 218 bool force_keep_session_state_; |
| 219 scoped_refptr<storage::SpecialStoragePolicy> special_storage_policy_; | 219 scoped_refptr<storage::SpecialStoragePolicy> special_storage_policy_; |
| 220 scoped_refptr<SessionStorageDatabase> session_storage_database_; | 220 scoped_refptr<SessionStorageDatabase> session_storage_database_; |
| 221 | 221 |
| 222 // For cleaning up unused namespaces gradually. | 222 // For cleaning up unused namespaces gradually. |
| 223 bool scavenging_started_; | 223 bool scavenging_started_; |
| 224 std::vector<std::string> deletable_persistent_namespace_ids_; | 224 std::vector<std::string> deletable_persistent_namespace_ids_; |
| 225 | 225 |
| 226 // Persistent namespace IDs to protect from gradual deletion (they will | 226 // Persistent namespace IDs to protect from gradual deletion (they will |
| 227 // be needed for session restore). | 227 // be needed for session restore). |
| 228 std::set<std::string> protected_persistent_session_ids_; | 228 std::set<std::string> protected_persistent_session_ids_; |
| 229 | 229 |
| 230 // Mapping between persistent namespace IDs and namespace IDs for | 230 // Mapping between persistent namespace IDs and namespace IDs for |
| 231 // sessionStorage. | 231 // sessionStorage. |
| 232 std::map<std::string, int64> persistent_namespace_id_to_namespace_id_; | 232 std::map<std::string, int64> persistent_namespace_id_to_namespace_id_; |
| 233 }; | 233 }; |
| 234 | 234 |
| 235 } // namespace content | 235 } // namespace content |
| 236 | 236 |
| 237 #endif // CONTENT_BROWSER_DOM_STORAGE_DOM_STORAGE_CONTEXT_IMPL_H_ | 237 #endif // CONTENT_BROWSER_DOM_STORAGE_DOM_STORAGE_CONTEXT_IMPL_H_ |
| OLD | NEW |