Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(5193)

Unified Diff: content/browser/dom_storage/dom_storage_context_wrapper.h

Issue 2288823005: Make DOMStorageContextWrapper a client of memory coordinator (Closed)
Patch Set: Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | content/browser/dom_storage/dom_storage_context_wrapper.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 701324850accb5570bacdd80feabc529dc074dbb..c75976cd8e0f70a2cb197106f2ea103f593f850b 100644
--- a/content/browser/dom_storage/dom_storage_context_wrapper.h
+++ b/content/browser/dom_storage/dom_storage_context_wrapper.h
@@ -11,6 +11,7 @@
#include "base/macros.h"
#include "base/memory/memory_pressure_listener.h"
#include "base/memory/ref_counted.h"
+#include "components/memory_coordinator/common/memory_coordinator_client.h"
#include "content/common/content_export.h"
#include "content/common/storage_partition_service.mojom.h"
#include "content/public/browser/dom_storage_context.h"
@@ -37,6 +38,7 @@ class LevelDBWrapperImpl;
// state.
class CONTENT_EXPORT DOMStorageContextWrapper :
NON_EXPORTED_BASE(public DOMStorageContext),
+ public memory_coordinator::MemoryCoordinatorClient,
public base::RefCountedThreadSafe<DOMStorageContextWrapper> {
public:
// If |data_path| is empty, nothing will be saved to disk.
@@ -78,6 +80,9 @@ class CONTENT_EXPORT DOMStorageContextWrapper :
void OnMemoryPressure(
base::MemoryPressureListener::MemoryPressureLevel memory_pressure_level);
+ // memory_coordinator::MemoryCoordinatorClient implementation.
+ void OnMemoryStateChange(memory_coordinator::MemoryState state) override;
+
private:
friend class DOMStorageMessageFilter; // for access to context()
friend class SessionStorageNamespaceImpl; // ditto
« no previous file with comments | « no previous file | content/browser/dom_storage/dom_storage_context_wrapper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698