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

Unified 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 side-by-side diff with in-line comments
Download patch
Index: webkit/dom_storage/dom_storage_session.h
===================================================================
--- webkit/dom_storage/dom_storage_session.h (revision 0)
+++ webkit/dom_storage/dom_storage_session.h (working copy)
@@ -1,46 +1,37 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef CONTENT_BROWSER_IN_PROCESS_WEBKIT_SESSION_STORAGE_NAMESPACE_H_
-#define CONTENT_BROWSER_IN_PROCESS_WEBKIT_SESSION_STORAGE_NAMESPACE_H_
+#ifndef WEBKIT_DOM_STORAGE_DOM_STORAGE_SESSION_H_
+#define WEBKIT_DOM_STORAGE_DOM_STORAGE_SESSION_H_
#pragma once
#include "base/basictypes.h"
#include "base/memory/ref_counted.h"
-#include "content/common/content_export.h"
-class WebKitContext;
+namespace dom_storage {
-// 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> {
+class DomStorageContext;
+
+class DomStorageSession
+ : public base::RefCountedThreadSafe<DomStorageSession> {
public:
- explicit SessionStorageNamespace(WebKitContext* context);
+ explicit DomStorageSession(DomStorageContext* context);
+ int64 namespace_id() const { return namespace_id_; }
+ DomStorageSession* Clone();
- int64 id() const { return id_; }
-
- // The session storage namespace parameter allows multiple render views and
- // tab contentses to share the same session storage (part of the WebStorage
- // spec) space. Passing in NULL simply allocates a new one which is often the
- // correct thing to do (especially in tests.
- SessionStorageNamespace* Clone();
-
private:
- SessionStorageNamespace(WebKitContext* webkit_context, int64 id);
+ friend class base::RefCountedThreadSafe<DomStorageContext>;
- friend class base::RefCountedThreadSafe<SessionStorageNamespace>;
- CONTENT_EXPORT ~SessionStorageNamespace();
+ DomStorageSession(DomStorageContext* context, int64 namespace_id);
+ ~DomStorageSession();
- scoped_refptr<WebKitContext> webkit_context_;
+ scoped_refptr<DomStorageContext> context_;
+ int64 namespace_id_;
- // The session storage namespace id.
- int64 id_;
-
- DISALLOW_IMPLICIT_CONSTRUCTORS(SessionStorageNamespace);
+ DISALLOW_IMPLICIT_CONSTRUCTORS(DomStorageSession);
};
-#endif // CONTENT_BROWSER_IN_PROCESS_WEBKIT_SESSION_STORAGE_NAMESPACE_H_
+} // namespace dom_storage
+
+#endif // WEBKIT_DOM_STORAGE_DOM_STORAGE_SESSION_H_

Powered by Google App Engine
This is Rietveld 408576698