OLD | NEW |
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_new.h" | 5 #include "content/browser/dom_storage/session_storage_namespace_impl.h" |
6 | 6 |
7 #ifdef ENABLE_NEW_DOM_STORAGE_BACKEND | 7 #include "content/browser/dom_storage/dom_storage_context_impl.h" |
8 | |
9 #include "content/browser/dom_storage/dom_storage_context_impl_new.h" | |
10 #include "webkit/dom_storage/dom_storage_session.h" | 8 #include "webkit/dom_storage/dom_storage_session.h" |
11 | 9 |
12 using dom_storage::DomStorageSession; | 10 using dom_storage::DomStorageSession; |
13 | 11 |
14 SessionStorageNamespaceImpl::SessionStorageNamespaceImpl( | 12 SessionStorageNamespaceImpl::SessionStorageNamespaceImpl( |
15 DOMStorageContextImpl* context) | 13 DOMStorageContextImpl* context) |
16 : session_(new DomStorageSession(context->context())) { | 14 : session_(new DomStorageSession(context->context())) { |
17 } | 15 } |
18 | 16 |
19 int64 SessionStorageNamespaceImpl::id() const { | 17 int64 SessionStorageNamespaceImpl::id() const { |
20 return session_->namespace_id(); | 18 return session_->namespace_id(); |
21 } | 19 } |
22 | 20 |
23 SessionStorageNamespaceImpl* SessionStorageNamespaceImpl::Clone() { | 21 SessionStorageNamespaceImpl* SessionStorageNamespaceImpl::Clone() { |
24 return new SessionStorageNamespaceImpl(session_->Clone()); | 22 return new SessionStorageNamespaceImpl(session_->Clone()); |
25 } | 23 } |
26 | 24 |
27 SessionStorageNamespaceImpl::SessionStorageNamespaceImpl( | 25 SessionStorageNamespaceImpl::SessionStorageNamespaceImpl( |
28 DomStorageSession* clone) | 26 DomStorageSession* clone) |
29 : session_(clone) { | 27 : session_(clone) { |
30 } | 28 } |
31 | 29 |
32 SessionStorageNamespaceImpl::~SessionStorageNamespaceImpl() { | 30 SessionStorageNamespaceImpl::~SessionStorageNamespaceImpl() { |
33 } | 31 } |
34 | |
35 #endif // ENABLE_NEW_DOM_STORAGE_BACKEND | |
OLD | NEW |