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

Unified Diff: base/memory/memory_pressure_monitor_chromeos.h

Issue 2097753002: Make memory pressure notifier configurable (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix win Created 4 years, 5 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 | « base/memory/memory_pressure_monitor.h ('k') | base/memory/memory_pressure_monitor_chromeos.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/memory/memory_pressure_monitor_chromeos.h
diff --git a/base/memory/memory_pressure_monitor_chromeos.h b/base/memory/memory_pressure_monitor_chromeos.h
index 5529c3b48a35857ddb1f923671a8850589354a5a..1000f30098792254a851d562000e53746f042916 100644
--- a/base/memory/memory_pressure_monitor_chromeos.h
+++ b/base/memory/memory_pressure_monitor_chromeos.h
@@ -60,6 +60,7 @@ class BASE_EXPORT MemoryPressureMonitor : public base::MemoryPressureMonitor {
// Get the current memory pressure level.
MemoryPressureListener::MemoryPressureLevel GetCurrentPressureLevel() const
override;
+ void SetDispatchCallback(const DispatchCallback& callback) override;
// Returns a type-casted version of the current memory pressure monitor. A
// simple wrapper to base::MemoryPressureMonitor::Get.
@@ -107,6 +108,8 @@ class BASE_EXPORT MemoryPressureMonitor : public base::MemoryPressureMonitor {
// File descriptor used to detect low memory condition.
ScopedFD low_mem_file_;
+ DispatchCallback dispatch_callback_;
+
base::WeakPtrFactory<MemoryPressureMonitor> weak_ptr_factory_;
DISALLOW_COPY_AND_ASSIGN(MemoryPressureMonitor);
« no previous file with comments | « base/memory/memory_pressure_monitor.h ('k') | base/memory/memory_pressure_monitor_chromeos.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698