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

Side by Side Diff: content/public/browser/session_storage_namespace.h

Issue 10572015: Session restore: Store and restore persistent IDs for sessionStorage. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: test fix 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
« no previous file with comments | « content/public/browser/dom_storage_context.h ('k') | webkit/dom_storage/dom_storage_context.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 CONTENT_PUBLIC_BROWSER_SESSION_STORAGE_NAMESPACE_H_ 5 #ifndef CONTENT_PUBLIC_BROWSER_SESSION_STORAGE_NAMESPACE_H_
6 #define CONTENT_PUBLIC_BROWSER_SESSION_STORAGE_NAMESPACE_H_ 6 #define CONTENT_PUBLIC_BROWSER_SESSION_STORAGE_NAMESPACE_H_
7 #pragma once 7 #pragma once
8 8
9 #include <string> 9 #include <string>
10 10
11 #include "base/basictypes.h" 11 #include "base/basictypes.h"
12 #include "base/memory/ref_counted.h" 12 #include "base/memory/ref_counted.h"
13 13
14 namespace content { 14 namespace content {
15 15
16 // This is a ref-counted class that represents a SessionStorageNamespace. 16 // This is a ref-counted class that represents a SessionStorageNamespace.
17 // On destruction it ensures that the storage namespace is destroyed. 17 // On destruction it ensures that the storage namespace is destroyed.
18 class SessionStorageNamespace 18 class SessionStorageNamespace
19 : public base::RefCountedThreadSafe<SessionStorageNamespace> { 19 : public base::RefCountedThreadSafe<SessionStorageNamespace> {
20 public: 20 public:
21 SessionStorageNamespace() {}
22
23 // Returns the ID of the |SessionStorageNamespace|. The ID is unique among all 21 // Returns the ID of the |SessionStorageNamespace|. The ID is unique among all
24 // SessionStorageNamespace objects, but not unique across browser runs. 22 // SessionStorageNamespace objects, but not unique across browser runs.
25 virtual int64 id() const = 0; 23 virtual int64 id() const = 0;
26 24
27 // Returns the persistent ID for the |SessionStorageNamespace|. The ID is 25 // Returns the persistent ID for the |SessionStorageNamespace|. The ID is
28 // unique across browser runs. 26 // unique across browser runs.
29 virtual const std::string& persistent_id() const = 0; 27 virtual const std::string& persistent_id() const = 0;
30 28
29 // For marking that the sessionStorage will be needed or won't be needed by
30 // session restore.
31 virtual void SetShouldPersist(bool should_persist) = 0;
32
31 protected: 33 protected:
32 friend class base::RefCountedThreadSafe<SessionStorageNamespace>; 34 friend class base::RefCountedThreadSafe<SessionStorageNamespace>;
33 virtual ~SessionStorageNamespace() {} 35 virtual ~SessionStorageNamespace() {}
34
35 DISALLOW_COPY_AND_ASSIGN(SessionStorageNamespace);
36 }; 36 };
37 37
38 } // namespace content 38 } // namespace content
39 39
40 #endif // CONTENT_PUBLIC_BROWSER_SESSION_STORAGE_NAMESPACE_H_ 40 #endif // CONTENT_PUBLIC_BROWSER_SESSION_STORAGE_NAMESPACE_H_
OLDNEW
« no previous file with comments | « content/public/browser/dom_storage_context.h ('k') | webkit/dom_storage/dom_storage_context.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698