| 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 138 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 149 // May be called on any thread. | 149 // May be called on any thread. |
| 150 int64 AllocateSessionId() { | 150 int64 AllocateSessionId() { |
| 151 return session_id_sequence_.GetNext(); | 151 return session_id_sequence_.GetNext(); |
| 152 } | 152 } |
| 153 | 153 |
| 154 std::string AllocatePersistentSessionId(); | 154 std::string AllocatePersistentSessionId(); |
| 155 | 155 |
| 156 // Must be called on the background thread. | 156 // Must be called on the background thread. |
| 157 void CreateSessionNamespace(int64 namespace_id, | 157 void CreateSessionNamespace(int64 namespace_id, |
| 158 const std::string& persistent_namespace_id); | 158 const std::string& persistent_namespace_id); |
| 159 void DeleteSessionNamespace(int64 namespace_id); | 159 void DeleteSessionNamespace(int64 namespace_id, bool should_persist_data); |
| 160 void CloneSessionNamespace(int64 existing_id, int64 new_id, | 160 void CloneSessionNamespace(int64 existing_id, int64 new_id, |
| 161 const std::string& new_persistent_id); | 161 const std::string& new_persistent_id); |
| 162 | 162 |
| 163 private: | 163 private: |
| 164 friend class DomStorageContextTest; | 164 friend class DomStorageContextTest; |
| 165 FRIEND_TEST_ALL_PREFIXES(DomStorageContextTest, Basics); | 165 FRIEND_TEST_ALL_PREFIXES(DomStorageContextTest, Basics); |
| 166 friend class base::RefCountedThreadSafe<DomStorageContext>; | 166 friend class base::RefCountedThreadSafe<DomStorageContext>; |
| 167 typedef std::map<int64, scoped_refptr<DomStorageNamespace> > | 167 typedef std::map<int64, scoped_refptr<DomStorageNamespace> > |
| 168 StorageNamespaceMap; | 168 StorageNamespaceMap; |
| 169 | 169 |
| (...skipping 23 matching lines...) Expand all Loading... |
| 193 base::AtomicSequenceNumber session_id_sequence_; | 193 base::AtomicSequenceNumber session_id_sequence_; |
| 194 | 194 |
| 195 bool is_shutdown_; | 195 bool is_shutdown_; |
| 196 bool force_keep_session_state_; | 196 bool force_keep_session_state_; |
| 197 scoped_refptr<quota::SpecialStoragePolicy> special_storage_policy_; | 197 scoped_refptr<quota::SpecialStoragePolicy> special_storage_policy_; |
| 198 }; | 198 }; |
| 199 | 199 |
| 200 } // namespace dom_storage | 200 } // namespace dom_storage |
| 201 | 201 |
| 202 #endif // WEBKIT_DOM_STORAGE_DOM_STORAGE_CONTEXT_H_ | 202 #endif // WEBKIT_DOM_STORAGE_DOM_STORAGE_CONTEXT_H_ |
| OLD | NEW |