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

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: comment 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
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..40697011092d6733df1d27db95358141ca536332 100644
--- a/base/memory/memory_pressure_monitor_chromeos.h
+++ b/base/memory/memory_pressure_monitor_chromeos.h
@@ -61,6 +61,8 @@ class BASE_EXPORT MemoryPressureMonitor : public base::MemoryPressureMonitor {
MemoryPressureListener::MemoryPressureLevel GetCurrentPressureLevel() const
override;
+ void SetDispatchCallback(DispatchCallback callback) override;
danakj 2016/07/08 00:03:53 nit: normally all overrides for a class are groupe
bashi 2016/07/08 00:13:05 Acknowledged.
+
// Returns a type-casted version of the current memory pressure monitor. A
// simple wrapper to base::MemoryPressureMonitor::Get.
static MemoryPressureMonitor* Get();
@@ -107,6 +109,9 @@ class BASE_EXPORT MemoryPressureMonitor : public base::MemoryPressureMonitor {
// File descriptor used to detect low memory condition.
ScopedFD low_mem_file_;
+ DispatchCallback dispatch_callback_ =
+ &MemoryPressureListener::NotifyMemoryPressure;
+
base::WeakPtrFactory<MemoryPressureMonitor> weak_ptr_factory_;
DISALLOW_COPY_AND_ASSIGN(MemoryPressureMonitor);

Powered by Google App Engine
This is Rietveld 408576698