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

Unified 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 side-by-side diff with in-line comments
Download patch
Index: content/public/browser/session_storage_namespace.h
diff --git a/content/public/browser/session_storage_namespace.h b/content/public/browser/session_storage_namespace.h
index 5b17d0ceaebd56e8c45794931e5525c6d17d47f8..096fe7de6cf9b7bdc039df7f3f042bb4cde35d2f 100644
--- a/content/public/browser/session_storage_namespace.h
+++ b/content/public/browser/session_storage_namespace.h
@@ -6,19 +6,32 @@
#define CONTENT_PUBLIC_BROWSER_SESSION_STORAGE_NAMESPACE_H_
#pragma once
+#include <string>
+
+#include "base/basictypes.h"
#include "base/memory/ref_counted.h"
namespace content {
// This is a ref-counted class that represents a SessionStorageNamespace.
// On destruction it ensures that the storage namespace is destroyed.
-// NOTE: That if we're shutting down, we don't strictly need to do this, but
-// it keeps valgrind happy.
class SessionStorageNamespace
: public base::RefCountedThreadSafe<SessionStorageNamespace> {
+ public:
+ SessionStorageNamespace() {}
michaeln 2012/06/15 18:29:51 is this ctor necessary?
marja 2012/06/18 07:08:30 Yes, because of the DISALLOW_COPY_AND_ASSIGN.
+
+ // Returns the ID of the |SessionStorageNamespace|. The ID is unique among all
+ // SessionStorageNamespace objects, but not unique across browser runs.
+ virtual int64 id() const = 0;
+ // Returns the persistent ID for the |SessionStorageNamespace|. The ID is
Avi (use Gerrit) 2012/06/18 14:40:14 Blank line above this comment.
marja 2012/06/18 15:00:11 Done.
+ // unique across browser runs.
+ virtual const std::string& persistent_id() const = 0;
+
protected:
friend class base::RefCountedThreadSafe<SessionStorageNamespace>;
virtual ~SessionStorageNamespace() {}
+
+ DISALLOW_COPY_AND_ASSIGN(SessionStorageNamespace);
};
} // namespace content
« 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