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

Side by Side 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 unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "chrome/browser/in_process_webkit/session_storage_namespace.h"
6
7 #include "chrome/browser/in_process_webkit/dom_storage_context.h"
8 #include "chrome/browser/in_process_webkit/webkit_context.h"
9 #include "chrome/browser/profile.h"
10
11 SessionStorageNamespace::SessionStorageNamespace(Profile* profile)
12 : webkit_context_(profile->GetWebKitContext()),
13 id_(webkit_context_->dom_storage_context()
14 ->AllocateSessionStorageNamespaceId()) {
15 }
16
17 SessionStorageNamespace::SessionStorageNamespace(WebKitContext* webkit_context,
18 int64 id)
19 : webkit_context_(webkit_context),
20 id_(id) {
21 }
22
23 SessionStorageNamespace::~SessionStorageNamespace() {
24 webkit_context_->DeleteSessionStorageNamespace(id_);
25 }
26
27 SessionStorageNamespace* SessionStorageNamespace::Clone() {
28 return new SessionStorageNamespace(
29 webkit_context_,
30 webkit_context_->dom_storage_context()->CloneSessionStorage(id_));
31 }
OLDNEW
« 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