Chromium Code Reviews| Index: content/browser/dom_storage/session_storage_namespace_impl.cc |
| diff --git a/content/browser/dom_storage/session_storage_namespace_impl.cc b/content/browser/dom_storage/session_storage_namespace_impl.cc |
| index fb46a318705e1d74b1b0d2b7ab19ac84df3880f8..aa98519979dfa391b16a9bb2f8340fe49f5b43e5 100644 |
| --- a/content/browser/dom_storage/session_storage_namespace_impl.cc |
| +++ b/content/browser/dom_storage/session_storage_namespace_impl.cc |
| @@ -4,6 +4,7 @@ |
| #include "content/browser/dom_storage/session_storage_namespace_impl.h" |
| +#include "base/logging.h" |
| #include "content/browser/dom_storage/dom_storage_context_impl.h" |
| #include "webkit/browser/dom_storage/dom_storage_session.h" |
| @@ -12,6 +13,16 @@ using dom_storage::DomStorageSession; |
| namespace content { |
| +// static |
| +SessionStorageNamespace* |
| +SessionStorageNamespace::Clone(DOMStorageContext* context, |
|
Charlie Reis
2013/07/31 17:16:16
Please have Albert review this.
jochen (gone - plz use gerrit)
2013/07/31 18:30:52
Added Albert.
|
| + SessionStorageNamespace* namespace_to_clone) { |
| + CHECK(static_cast<SessionStorageNamespaceImpl*>(namespace_to_clone)-> |
| + IsFromContext(static_cast<DOMStorageContextImpl*>(context))); |
| + return new SessionStorageNamespaceImpl( |
| + static_cast<DOMStorageContextImpl*>(context), namespace_to_clone->id()); |
| +} |
| + |
| SessionStorageNamespaceImpl::SessionStorageNamespaceImpl( |
| DOMStorageContextImpl* context) |
| : session_(new DomStorageSession(context->context())) { |