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

Side by Side Diff: content/browser/dom_storage/session_storage_namespace_impl.cc

Issue 9963107: Persist sessionStorage on disk. (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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 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 #include "content/browser/dom_storage/session_storage_namespace_impl.h" 5 #include "content/browser/dom_storage/session_storage_namespace_impl.h"
6 6
7 #include "content/browser/dom_storage/dom_storage_context_impl.h" 7 #include "content/browser/dom_storage/dom_storage_context_impl.h"
8 #include "webkit/dom_storage/dom_storage_session.h" 8 #include "webkit/dom_storage/dom_storage_session.h"
9 9
10 using dom_storage::DomStorageSession; 10 using dom_storage::DomStorageSession;
11 11
12 SessionStorageNamespaceImpl::SessionStorageNamespaceImpl( 12 SessionStorageNamespaceImpl::SessionStorageNamespaceImpl(
13 DOMStorageContextImpl* context) 13 DOMStorageContextImpl* context)
14 : session_(new DomStorageSession(context->context())) { 14 : session_(new DomStorageSession(context->context())) {
15 } 15 }
16 16
17 SessionStorageNamespaceImpl::SessionStorageNamespaceImpl(
18 DOMStorageContextImpl* context,
19 const std::string& persistent_id)
20 : session_(new DomStorageSession(context->context(),
21 persistent_id)) {
22 }
23
17 int64 SessionStorageNamespaceImpl::id() const { 24 int64 SessionStorageNamespaceImpl::id() const {
18 return session_->namespace_id(); 25 return session_->namespace_id();
19 } 26 }
20 27
28 std::string SessionStorageNamespaceImpl::persistent_id() const {
29 return session_->persistent_namespace_id();
30 }
31
21 SessionStorageNamespaceImpl* SessionStorageNamespaceImpl::Clone() { 32 SessionStorageNamespaceImpl* SessionStorageNamespaceImpl::Clone() {
22 return new SessionStorageNamespaceImpl(session_->Clone()); 33 return new SessionStorageNamespaceImpl(session_->Clone());
23 } 34 }
24 35
25 SessionStorageNamespaceImpl::SessionStorageNamespaceImpl( 36 SessionStorageNamespaceImpl::SessionStorageNamespaceImpl(
26 DomStorageSession* clone) 37 DomStorageSession* clone)
27 : session_(clone) { 38 : session_(clone) {
28 } 39 }
29 40
30 SessionStorageNamespaceImpl::~SessionStorageNamespaceImpl() { 41 SessionStorageNamespaceImpl::~SessionStorageNamespaceImpl() {
31 } 42 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698