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

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

Issue 10546167: Create and store persistent unique ids for sessionStorage. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: code review 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 133 matching lines...) Expand 10 before | Expand all | Expand 10 after
144 const GURL& page_url); 144 const GURL& page_url);
145 void NotifyAreaCleared( 145 void NotifyAreaCleared(
146 const DomStorageArea* area, 146 const DomStorageArea* area,
147 const GURL& page_url); 147 const GURL& page_url);
148 148
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();
155
154 // Must be called on the background thread. 156 // Must be called on the background thread.
155 void CreateSessionNamespace(int64 namespace_id); 157 void CreateSessionNamespace(int64 namespace_id,
158 const std::string& persistent_namespace_id);
156 void DeleteSessionNamespace(int64 namespace_id); 159 void DeleteSessionNamespace(int64 namespace_id);
157 void CloneSessionNamespace(int64 existing_id, int64 new_id); 160 void CloneSessionNamespace(int64 existing_id, int64 new_id,
161 const std::string& new_persistent_id);
158 162
159 private: 163 private:
160 friend class DomStorageContextTest; 164 friend class DomStorageContextTest;
161 FRIEND_TEST_ALL_PREFIXES(DomStorageContextTest, Basics); 165 FRIEND_TEST_ALL_PREFIXES(DomStorageContextTest, Basics);
162 friend class base::RefCountedThreadSafe<DomStorageContext>; 166 friend class base::RefCountedThreadSafe<DomStorageContext>;
163 typedef std::map<int64, scoped_refptr<DomStorageNamespace> > 167 typedef std::map<int64, scoped_refptr<DomStorageNamespace> >
164 StorageNamespaceMap; 168 StorageNamespaceMap;
165 169
166 ~DomStorageContext(); 170 ~DomStorageContext();
167 171
(...skipping 21 matching lines...) Expand all
189 base::AtomicSequenceNumber session_id_sequence_; 193 base::AtomicSequenceNumber session_id_sequence_;
190 194
191 bool is_shutdown_; 195 bool is_shutdown_;
192 bool force_keep_session_state_; 196 bool force_keep_session_state_;
193 scoped_refptr<quota::SpecialStoragePolicy> special_storage_policy_; 197 scoped_refptr<quota::SpecialStoragePolicy> special_storage_policy_;
194 }; 198 };
195 199
196 } // namespace dom_storage 200 } // namespace dom_storage
197 201
198 #endif // WEBKIT_DOM_STORAGE_DOM_STORAGE_CONTEXT_H_ 202 #endif // WEBKIT_DOM_STORAGE_DOM_STORAGE_CONTEXT_H_
OLDNEW
« no previous file with comments | « webkit/dom_storage/dom_storage_area_unittest.cc ('k') | webkit/dom_storage/dom_storage_context.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698