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

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

Issue 9146025: Framing for a DOMStorage backend that does not depend on in-process-webkit. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 8 years, 11 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) 2011 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_BROWSER_IN_PROCESS_WEBKIT_SESSION_STORAGE_NAMESPACE_H_ 5 #ifndef WEBKIT_DOM_STORAGE_DOM_STORAGE_AREA_H_
6 #define CONTENT_BROWSER_IN_PROCESS_WEBKIT_SESSION_STORAGE_NAMESPACE_H_ 6 #define WEBKIT_DOM_STORAGE_DOM_STORAGE_AREA_H_
7 #pragma once 7 #pragma once
8 8
9 #include "base/basictypes.h" 9 #include "base/basictypes.h"
10 #include "base/memory/ref_counted.h" 10 #include "base/memory/ref_counted.h"
11 #include "content/common/content_export.h"
12 11
13 class WebKitContext; 12 namespace dom_storage {
14 13
15 // This is a ref-counted class that represents a SessionStorageNamespace. 14 class DOMStorageContext;
16 // On destruction it ensures that the storage namespace is destroyed. 15
17 // NOTE: That if we're shutting down, we don't strictly need to do this, but 16 class DOMStorageSession
marja 2012/01/24 10:00:56 DOMSessionStorage instead of DOMStorageSession?
jsbell 2012/01/24 19:37:25 Add a comment explaining the use of this type, as
18 // it keeps valgrind happy. 17 : public base::RefCountedThreadSafe<DOMStorageSession> {
19 class SessionStorageNamespace
20 : public base::RefCountedThreadSafe<SessionStorageNamespace> {
21 public: 18 public:
22 explicit SessionStorageNamespace(WebKitContext* context); 19 explicit DOMStorageSession(DOMStorageContext* context);
23 20 int64 namespace_id() const { return namespace_id_; }
24 int64 id() const { return id_; } 21 DOMStorageSession* Clone();
25
26 // The session storage namespace parameter allows multiple render views and
27 // tab contentses to share the same session storage (part of the WebStorage
28 // spec) space. Passing in NULL simply allocates a new one which is often the
29 // correct thing to do (especially in tests.
30 SessionStorageNamespace* Clone();
31 22
32 private: 23 private:
33 SessionStorageNamespace(WebKitContext* webkit_context, int64 id); 24 DOMStorageSession(DOMStorageContext* context, int64 namespace_id);
34 25
35 friend class base::RefCountedThreadSafe<SessionStorageNamespace>; 26 friend class base::RefCountedThreadSafe<DOMStorageContext>;
36 CONTENT_EXPORT ~SessionStorageNamespace(); 27 ~DOMStorageSession();
37 28
38 scoped_refptr<WebKitContext> webkit_context_; 29 scoped_refptr<DOMStorageContext> context_;
30 int64 namespace_id_;
39 31
40 // The session storage namespace id. 32 DISALLOW_IMPLICIT_CONSTRUCTORS(DOMStorageSession);
41 int64 id_;
42
43 DISALLOW_IMPLICIT_CONSTRUCTORS(SessionStorageNamespace);
44 }; 33 };
45 34
46 #endif // CONTENT_BROWSER_IN_PROCESS_WEBKIT_SESSION_STORAGE_NAMESPACE_H_ 35 } // namespace dom_storage
36
37 #endif // WEBKIT_DOM_STORAGE_DOM_STORAGE_AREA_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698