Index: content/browser/dom_storage/dom_storage_context_wrapper.h |
diff --git a/content/browser/dom_storage/dom_storage_context_wrapper.h b/content/browser/dom_storage/dom_storage_context_wrapper.h |
index 17796ff8bb56bd80895e57c457fc26108d901169..701324850accb5570bacdd80feabc529dc074dbb 100644 |
--- a/content/browser/dom_storage/dom_storage_context_wrapper.h |
+++ b/content/browser/dom_storage/dom_storage_context_wrapper.h |
@@ -9,6 +9,7 @@ |
#include <string> |
#include "base/macros.h" |
+#include "base/memory/memory_pressure_listener.h" |
#include "base/memory/ref_counted.h" |
#include "content/common/content_export.h" |
#include "content/common/storage_partition_service.mojom.h" |
@@ -73,6 +74,10 @@ class CONTENT_EXPORT DOMStorageContextWrapper : |
mojom::LevelDBObserverPtr observer, |
mojom::LevelDBWrapperRequest request); |
+ // Called on UI thread when the system is under memory pressure. |
+ void OnMemoryPressure( |
+ base::MemoryPressureListener::MemoryPressureLevel memory_pressure_level); |
+ |
private: |
friend class DOMStorageMessageFilter; // for access to context() |
friend class SessionStorageNamespaceImpl; // ditto |
@@ -86,6 +91,9 @@ class CONTENT_EXPORT DOMStorageContextWrapper : |
class MojoState; |
std::unique_ptr<MojoState> mojo_state_; |
+ // To receive memory pressure signals. |
+ std::unique_ptr<base::MemoryPressureListener> memory_pressure_listener_; |
+ |
scoped_refptr<DOMStorageContextImpl> context_; |
DISALLOW_IMPLICIT_CONSTRUCTORS(DOMStorageContextWrapper); |