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

Side by Side Diff: content/public/browser/session_storage_namespace.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 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>
10
11 #include "base/basictypes.h"
9 #include "base/memory/ref_counted.h" 12 #include "base/memory/ref_counted.h"
10 13
11 namespace content { 14 namespace content {
12 15
13 // This is a ref-counted class that represents a SessionStorageNamespace. 16 // This is a ref-counted class that represents a SessionStorageNamespace.
14 // On destruction it ensures that the storage namespace is destroyed. 17 // On destruction it ensures that the storage namespace is destroyed.
15 // NOTE: That if we're shutting down, we don't strictly need to do this, but
16 // it keeps valgrind happy.
17 class SessionStorageNamespace 18 class SessionStorageNamespace
18 : public base::RefCountedThreadSafe<SessionStorageNamespace> { 19 : public base::RefCountedThreadSafe<SessionStorageNamespace> {
20 public:
21 SessionStorageNamespace() {}
22
23 // Returns the ID of the |SessionStorageNamespace|. The ID is unique among all
24 // SessionStorageNamespace objects, but not unique across browser runs.
25 virtual int64 id() const = 0;
26
27 // Returns the persistent ID for the |SessionStorageNamespace|. The ID is
28 // unique across browser runs.
29 virtual const std::string& persistent_id() const = 0;
30
19 protected: 31 protected:
20 friend class base::RefCountedThreadSafe<SessionStorageNamespace>; 32 friend class base::RefCountedThreadSafe<SessionStorageNamespace>;
21 virtual ~SessionStorageNamespace() {} 33 virtual ~SessionStorageNamespace() {}
34
35 DISALLOW_COPY_AND_ASSIGN(SessionStorageNamespace);
22 }; 36 };
23 37
24 } // namespace content 38 } // namespace content
25 39
26 #endif // CONTENT_PUBLIC_BROWSER_SESSION_STORAGE_NAMESPACE_H_ 40 #endif // CONTENT_PUBLIC_BROWSER_SESSION_STORAGE_NAMESPACE_H_
OLDNEW
« no previous file with comments | « content/browser/dom_storage/session_storage_namespace_impl.cc ('k') | webkit/dom_storage/dom_storage_area.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698