Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(915)

Side by Side Diff: webkit/dom_storage/dom_storage_context.h

Issue 10572015: Session restore: Store and restore persistent IDs for sessionStorage. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 8 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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
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
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_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698