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

Unified Diff: chrome/browser/in_process_webkit/session_storage_namespace.cc

Issue 3325012: Fix SessionStorage (Closed)
Patch Set: kill the last (new) dcheck Created 10 years, 3 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: chrome/browser/in_process_webkit/session_storage_namespace.cc
diff --git a/chrome/browser/in_process_webkit/session_storage_namespace.cc b/chrome/browser/in_process_webkit/session_storage_namespace.cc
new file mode 100644
index 0000000000000000000000000000000000000000..cfa2a5ae7e60b885b7df3578c0a21c169910706a
--- /dev/null
+++ b/chrome/browser/in_process_webkit/session_storage_namespace.cc
@@ -0,0 +1,31 @@
+// Copyright (c) 2010 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.
+
+#include "chrome/browser/in_process_webkit/session_storage_namespace.h"
+
+#include "chrome/browser/in_process_webkit/dom_storage_context.h"
+#include "chrome/browser/in_process_webkit/webkit_context.h"
+#include "chrome/browser/profile.h"
+
+SessionStorageNamespace::SessionStorageNamespace(Profile* profile)
+ : webkit_context_(profile->GetWebKitContext()),
+ id_(webkit_context_->dom_storage_context()
+ ->AllocateSessionStorageNamespaceId()) {
+}
+
+SessionStorageNamespace::SessionStorageNamespace(WebKitContext* webkit_context,
+ int64 id)
+ : webkit_context_(webkit_context),
+ id_(id) {
+}
+
+SessionStorageNamespace::~SessionStorageNamespace() {
+ webkit_context_->DeleteSessionStorageNamespace(id_);
+}
+
+SessionStorageNamespace* SessionStorageNamespace::Clone() {
+ return new SessionStorageNamespace(
+ webkit_context_,
+ webkit_context_->dom_storage_context()->CloneSessionStorage(id_));
+}
« no previous file with comments | « chrome/browser/in_process_webkit/session_storage_namespace.h ('k') | chrome/browser/in_process_webkit/webkit_context.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698