| 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 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 89 // Called on UI thread when the system is under memory pressure. | 89 // Called on UI thread when the system is under memory pressure. |
| 90 void OnMemoryPressure( | 90 void OnMemoryPressure( |
| 91 base::MemoryPressureListener::MemoryPressureLevel memory_pressure_level); | 91 base::MemoryPressureListener::MemoryPressureLevel memory_pressure_level); |
| 92 | 92 |
| 93 // base::MemoryCoordinatorClient implementation: | 93 // base::MemoryCoordinatorClient implementation: |
| 94 void OnPurgeMemory() override; | 94 void OnPurgeMemory() override; |
| 95 | 95 |
| 96 void PurgeMemory(DOMStorageContextImpl::PurgeOption purge_option); | 96 void PurgeMemory(DOMStorageContextImpl::PurgeOption purge_option); |
| 97 | 97 |
| 98 void GotMojoLocalStorageUsage(GetLocalStorageUsageCallback callback, | 98 void GotMojoLocalStorageUsage(GetLocalStorageUsageCallback callback, |
| 99 base::SingleThreadTaskRunner* reply_task_runner, |
| 99 std::vector<LocalStorageUsageInfo> usage); | 100 std::vector<LocalStorageUsageInfo> usage); |
| 100 | 101 |
| 101 // Keep all mojo-ish details together and not bleed them through the public | 102 // Keep all mojo-ish details together and not bleed them through the public |
| 102 // interface. | 103 // interface. The |mojo_state_| object is owned by this object, but destroyed |
| 103 std::unique_ptr<LocalStorageContextMojo> mojo_state_; | 104 // asynchronously on the |mojo_task_runner_|. |
| 105 LocalStorageContextMojo* mojo_state_ = nullptr; |
| 106 scoped_refptr<base::SingleThreadTaskRunner> mojo_task_runner_; |
| 104 | 107 |
| 105 // To receive memory pressure signals. | 108 // To receive memory pressure signals. |
| 106 std::unique_ptr<base::MemoryPressureListener> memory_pressure_listener_; | 109 std::unique_ptr<base::MemoryPressureListener> memory_pressure_listener_; |
| 107 | 110 |
| 108 scoped_refptr<DOMStorageContextImpl> context_; | 111 scoped_refptr<DOMStorageContextImpl> context_; |
| 109 | 112 |
| 110 DISALLOW_IMPLICIT_CONSTRUCTORS(DOMStorageContextWrapper); | 113 DISALLOW_IMPLICIT_CONSTRUCTORS(DOMStorageContextWrapper); |
| 111 }; | 114 }; |
| 112 | 115 |
| 113 } // namespace content | 116 } // namespace content |
| 114 | 117 |
| 115 #endif // CONTENT_BROWSER_DOM_STORAGE_DOM_STORAGE_CONTEXT_WRAPPER_H_ | 118 #endif // CONTENT_BROWSER_DOM_STORAGE_DOM_STORAGE_CONTEXT_WRAPPER_H_ |
| OLD | NEW |