| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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_DOM_STORAGE_CONTEXT_WRAPPER_H_ | 5 #ifndef CONTENT_BROWSER_DOM_STORAGE_DOM_STORAGE_CONTEXT_WRAPPER_H_ |
| 6 #define CONTENT_BROWSER_DOM_STORAGE_DOM_STORAGE_CONTEXT_WRAPPER_H_ | 6 #define CONTENT_BROWSER_DOM_STORAGE_DOM_STORAGE_CONTEXT_WRAPPER_H_ |
| 7 | 7 |
| 8 #include <map> | 8 #include <map> |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 57 void SetForceKeepSessionState(); | 57 void SetForceKeepSessionState(); |
| 58 | 58 |
| 59 // Called when the BrowserContext/Profile is going away. | 59 // Called when the BrowserContext/Profile is going away. |
| 60 void Shutdown(); | 60 void Shutdown(); |
| 61 | 61 |
| 62 void Flush(); | 62 void Flush(); |
| 63 | 63 |
| 64 // See StoragePartitionService interface. | 64 // See StoragePartitionService interface. |
| 65 void OpenLocalStorage( | 65 void OpenLocalStorage( |
| 66 const mojo::String& origin, | 66 const mojo::String& origin, |
| 67 LevelDBObserverPtr observer, | |
| 68 mojo::InterfaceRequest<LevelDBWrapper> request); | 67 mojo::InterfaceRequest<LevelDBWrapper> request); |
| 69 | 68 |
| 70 private: | 69 private: |
| 71 friend class DOMStorageMessageFilter; // for access to context() | 70 friend class DOMStorageMessageFilter; // for access to context() |
| 72 friend class SessionStorageNamespaceImpl; // ditto | 71 friend class SessionStorageNamespaceImpl; // ditto |
| 73 friend class base::RefCountedThreadSafe<DOMStorageContextWrapper>; | 72 friend class base::RefCountedThreadSafe<DOMStorageContextWrapper>; |
| 74 | 73 |
| 75 ~DOMStorageContextWrapper() override; | 74 ~DOMStorageContextWrapper() override; |
| 76 DOMStorageContextImpl* context() const { return context_.get(); } | 75 DOMStorageContextImpl* context() const { return context_.get(); } |
| 77 | 76 |
| 78 void LevelDBWrapperImplHasNoBindings(const std::string& origin); | 77 void LevelDBWrapperImplHasNoBindings(const std::string& origin); |
| 79 | 78 |
| 80 // Used for mojo-based LocalStorage implementation (behind | 79 // Used for mojo-based LocalStorage implementation (behind |
| 81 // --mojo-local-storage for now). Maps between an origin and its prefixed | 80 // --mojo-local-storage for now). Maps between an origin and its prefixed |
| 82 // LevelDB view. | 81 // LevelDB view. |
| 83 std::map<std::string, scoped_ptr<LevelDBWrapperImpl>> level_db_wrappers_; | 82 std::map<std::string, scoped_ptr<LevelDBWrapperImpl>> level_db_wrappers_; |
| 84 | 83 |
| 85 scoped_refptr<DOMStorageContextImpl> context_; | 84 scoped_refptr<DOMStorageContextImpl> context_; |
| 86 | 85 |
| 87 DISALLOW_IMPLICIT_CONSTRUCTORS(DOMStorageContextWrapper); | 86 DISALLOW_IMPLICIT_CONSTRUCTORS(DOMStorageContextWrapper); |
| 88 }; | 87 }; |
| 89 | 88 |
| 90 } // namespace content | 89 } // namespace content |
| 91 | 90 |
| 92 #endif // CONTENT_BROWSER_DOM_STORAGE_DOM_STORAGE_CONTEXT_WRAPPER_H_ | 91 #endif // CONTENT_BROWSER_DOM_STORAGE_DOM_STORAGE_CONTEXT_WRAPPER_H_ |
| OLD | NEW |