| 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 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 74 void Flush(); | 74 void Flush(); |
| 75 | 75 |
| 76 // See mojom::StoragePartitionService interface. | 76 // See mojom::StoragePartitionService interface. |
| 77 void OpenLocalStorage(const url::Origin& origin, | 77 void OpenLocalStorage(const url::Origin& origin, |
| 78 mojom::LevelDBWrapperRequest request); | 78 mojom::LevelDBWrapperRequest request); |
| 79 | 79 |
| 80 private: | 80 private: |
| 81 friend class DOMStorageMessageFilter; // for access to context() | 81 friend class DOMStorageMessageFilter; // for access to context() |
| 82 friend class SessionStorageNamespaceImpl; // ditto | 82 friend class SessionStorageNamespaceImpl; // ditto |
| 83 friend class base::RefCountedThreadSafe<DOMStorageContextWrapper>; | 83 friend class base::RefCountedThreadSafe<DOMStorageContextWrapper>; |
| 84 friend class MojoDOMStorageBrowserTest; |
| 84 | 85 |
| 85 ~DOMStorageContextWrapper() override; | 86 ~DOMStorageContextWrapper() override; |
| 86 DOMStorageContextImpl* context() const { return context_.get(); } | 87 DOMStorageContextImpl* context() const { return context_.get(); } |
| 87 | 88 |
| 88 // Called on UI thread when the system is under memory pressure. | 89 // Called on UI thread when the system is under memory pressure. |
| 89 void OnMemoryPressure( | 90 void OnMemoryPressure( |
| 90 base::MemoryPressureListener::MemoryPressureLevel memory_pressure_level); | 91 base::MemoryPressureListener::MemoryPressureLevel memory_pressure_level); |
| 91 | 92 |
| 92 // base::MemoryCoordinatorClient implementation: | 93 // base::MemoryCoordinatorClient implementation: |
| 93 void OnMemoryStateChange(base::MemoryState state) override; | 94 void OnMemoryStateChange(base::MemoryState state) override; |
| (...skipping 11 matching lines...) Expand all Loading... |
| 105 std::unique_ptr<base::MemoryPressureListener> memory_pressure_listener_; | 106 std::unique_ptr<base::MemoryPressureListener> memory_pressure_listener_; |
| 106 | 107 |
| 107 scoped_refptr<DOMStorageContextImpl> context_; | 108 scoped_refptr<DOMStorageContextImpl> context_; |
| 108 | 109 |
| 109 DISALLOW_IMPLICIT_CONSTRUCTORS(DOMStorageContextWrapper); | 110 DISALLOW_IMPLICIT_CONSTRUCTORS(DOMStorageContextWrapper); |
| 110 }; | 111 }; |
| 111 | 112 |
| 112 } // namespace content | 113 } // namespace content |
| 113 | 114 |
| 114 #endif // CONTENT_BROWSER_DOM_STORAGE_DOM_STORAGE_CONTEXT_WRAPPER_H_ | 115 #endif // CONTENT_BROWSER_DOM_STORAGE_DOM_STORAGE_CONTEXT_WRAPPER_H_ |
| OLD | NEW |