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

Unified Diff: base/memory/memory_pressure_monitor_win.h

Issue 2097753002: Make memory pressure notifier configurable (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix another error 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_win.h
diff --git a/base/memory/memory_pressure_monitor_win.h b/base/memory/memory_pressure_monitor_win.h
index 5689ac6ac74a2befa9f2fac5d749948562953437..b52a2d27bfa456a625040e640de41c48ec6f66a5 100644
--- a/base/memory/memory_pressure_monitor_win.h
+++ b/base/memory/memory_pressure_monitor_win.h
@@ -63,6 +63,7 @@ class BASE_EXPORT MemoryPressureMonitor : public base::MemoryPressureMonitor {
// Get the current memory pressure level. This can be called from any thread.
MemoryPressureLevel GetCurrentPressureLevel() const override;
+ void SetDispatchCallback(const DispatchCallback& callback) override;
// Returns the moderate pressure level free memory threshold, in MB.
int moderate_threshold_mb() const { return moderate_threshold_mb_; }
@@ -132,6 +133,8 @@ class BASE_EXPORT MemoryPressureMonitor : public base::MemoryPressureMonitor {
// Ensures that this object is used from a single thread.
base::ThreadChecker thread_checker_;
+ DispatchCallback dispatch_callback_;
+
// Weak pointer factory to ourself used for scheduling calls to
// CheckMemoryPressure/CheckMemoryPressureAndRecordStatistics via |timer_|.
base::WeakPtrFactory<MemoryPressureMonitor> weak_ptr_factory_;

Powered by Google App Engine
This is Rietveld 408576698