Chromium Code Reviews| 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 #ifndef CONTENT_BROWSER_DOM_STORAGE_SESSION_STORAGE_NAMESPACE_IMPL_H_ | 5 #ifndef CONTENT_BROWSER_DOM_STORAGE_SESSION_STORAGE_NAMESPACE_IMPL_H_ |
| 6 #define CONTENT_BROWSER_DOM_STORAGE_SESSION_STORAGE_NAMESPACE_IMPL_H_ | 6 #define CONTENT_BROWSER_DOM_STORAGE_SESSION_STORAGE_NAMESPACE_IMPL_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include "base/basictypes.h" | 9 #include "base/basictypes.h" |
| 10 #include "base/memory/ref_counted.h" | 10 #include "base/memory/ref_counted.h" |
| 11 #include "content/common/content_export.h" | 11 #include "content/common/content_export.h" |
| 12 #include "content/public/browser/session_storage_namespace.h" | 12 #include "content/public/browser/session_storage_namespace.h" |
| 13 | 13 |
| 14 class DOMStorageContextImpl; | 14 class DOMStorageContextImpl; |
| 15 | 15 |
| 16 namespace dom_storage { | 16 namespace dom_storage { |
| 17 class DomStorageSession; | 17 class DomStorageSession; |
| 18 } | 18 } |
| 19 | 19 |
| 20 class SessionStorageNamespaceImpl | 20 class SessionStorageNamespaceImpl |
| 21 : NON_EXPORTED_BASE(public content::SessionStorageNamespace) { | 21 : NON_EXPORTED_BASE(public content::SessionStorageNamespace) { |
| 22 public: | 22 public: |
| 23 // Constructs a |SessionStorageNamespaceImpl| and allocates new IDs for it. | |
| 23 explicit SessionStorageNamespaceImpl(DOMStorageContextImpl* context); | 24 explicit SessionStorageNamespaceImpl(DOMStorageContextImpl* context); |
| 25 | |
| 26 // Constructs a |SessionStorageNamespaceImpl| by cloning | |
| 27 // |namespace_to_clone|. Allocates new IDs for it. | |
| 24 SessionStorageNamespaceImpl(DOMStorageContextImpl* context, | 28 SessionStorageNamespaceImpl(DOMStorageContextImpl* context, |
| 25 int64 namepace_id_to_clone); | 29 int64 namepace_id_to_clone); |
| 26 int64 id() const; | 30 |
| 31 // Constructs a |SessionStorageNamespaceImpl| and assigns |persistent_id| | |
| 32 // to it. Allocates a new non-persistent ID. | |
| 33 SessionStorageNamespaceImpl(DOMStorageContextImpl* context, | |
| 34 const std::string& persistent_id); | |
| 35 virtual int64 id() const OVERRIDE; | |
|
jochen (gone - plz use gerrit)
2012/06/15 13:57:21
can you move the virtual methods in a separate blo
marja
2012/06/15 14:31:32
Done.
| |
| 36 virtual const std::string& persistent_id() const OVERRIDE; | |
| 27 SessionStorageNamespaceImpl* Clone(); | 37 SessionStorageNamespaceImpl* Clone(); |
| 28 | 38 |
| 29 private: | 39 private: |
| 30 explicit SessionStorageNamespaceImpl(dom_storage::DomStorageSession* clone); | 40 explicit SessionStorageNamespaceImpl(dom_storage::DomStorageSession* clone); |
| 31 virtual ~SessionStorageNamespaceImpl(); | 41 virtual ~SessionStorageNamespaceImpl(); |
| 32 | 42 |
| 33 scoped_refptr<dom_storage::DomStorageSession> session_; | 43 scoped_refptr<dom_storage::DomStorageSession> session_; |
| 34 | 44 |
| 35 DISALLOW_COPY_AND_ASSIGN(SessionStorageNamespaceImpl); | 45 DISALLOW_COPY_AND_ASSIGN(SessionStorageNamespaceImpl); |
| 36 }; | 46 }; |
| 37 | 47 |
| 38 #endif // CONTENT_BROWSER_DOM_STORAGE_SESSION_STORAGE_NAMESPACE_IMPL_H_ | 48 #endif // CONTENT_BROWSER_DOM_STORAGE_SESSION_STORAGE_NAMESPACE_IMPL_H_ |
| OLD | NEW |