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

Side by Side Diff: webkit/dom_storage/dom_storage_session.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_SESSION_H_ 5 #ifndef WEBKIT_DOM_STORAGE_DOM_STORAGE_SESSION_H_
6 #define WEBKIT_DOM_STORAGE_DOM_STORAGE_SESSION_H_ 6 #define WEBKIT_DOM_STORAGE_DOM_STORAGE_SESSION_H_
7 #pragma once 7 #pragma once
8 8
9 #include <string> 9 #include <string>
10 10
(...skipping 16 matching lines...) Expand all
27 27
28 // Constructs a |DomStorageSession| and assigns |persistent_namespace_id| 28 // Constructs a |DomStorageSession| and assigns |persistent_namespace_id|
29 // to it. Allocates a new non-persistent ID. 29 // to it. Allocates a new non-persistent ID.
30 DomStorageSession(DomStorageContext* context, 30 DomStorageSession(DomStorageContext* context,
31 const std::string& persistent_namespace_id); 31 const std::string& persistent_namespace_id);
32 32
33 int64 namespace_id() const { return namespace_id_; } 33 int64 namespace_id() const { return namespace_id_; }
34 const std::string& persistent_namespace_id() const { 34 const std::string& persistent_namespace_id() const {
35 return persistent_namespace_id_; 35 return persistent_namespace_id_;
36 } 36 }
37 void SetShouldPersist(bool should_persist);
37 DomStorageSession* Clone(); 38 DomStorageSession* Clone();
38 39
39 // Constructs a |DomStorageSession| by cloning 40 // Constructs a |DomStorageSession| by cloning
40 // |namespace_id_to_clone|. Allocates new IDs for it. 41 // |namespace_id_to_clone|. Allocates new IDs for it.
41 static DomStorageSession* CloneFrom(DomStorageContext* context, 42 static DomStorageSession* CloneFrom(DomStorageContext* context,
42 int64 namepace_id_to_clone); 43 int64 namepace_id_to_clone);
43 44
44 private: 45 private:
45 friend class base::RefCountedThreadSafe<DomStorageSession>; 46 friend class base::RefCountedThreadSafe<DomStorageSession>;
46 47
47 DomStorageSession(DomStorageContext* context, 48 DomStorageSession(DomStorageContext* context,
48 int64 namespace_id, 49 int64 namespace_id,
49 const std::string& persistent_namespace_id); 50 const std::string& persistent_namespace_id);
50 ~DomStorageSession(); 51 ~DomStorageSession();
51 52
52 scoped_refptr<DomStorageContext> context_; 53 scoped_refptr<DomStorageContext> context_;
53 int64 namespace_id_; 54 int64 namespace_id_;
54 std::string persistent_namespace_id_; 55 std::string persistent_namespace_id_;
56 bool should_persist_;
55 57
56 DISALLOW_IMPLICIT_CONSTRUCTORS(DomStorageSession); 58 DISALLOW_IMPLICIT_CONSTRUCTORS(DomStorageSession);
57 }; 59 };
58 60
59 } // namespace dom_storage 61 } // namespace dom_storage
60 62
61 #endif // WEBKIT_DOM_STORAGE_DOM_STORAGE_SESSION_H_ 63 #endif // WEBKIT_DOM_STORAGE_DOM_STORAGE_SESSION_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698