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

Unified Diff: base/memory/memory_pressure_monitor_win.cc

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_win.cc
diff --git a/base/memory/memory_pressure_monitor_win.cc b/base/memory/memory_pressure_monitor_win.cc
index 8ac66cec0880248cdea7107cd2c6b33806e4cdf4..2bb8cd0c27cae882a74da0e4e824d6e1ac70cece 100644
--- a/base/memory/memory_pressure_monitor_win.cc
+++ b/base/memory/memory_pressure_monitor_win.cc
@@ -198,7 +198,7 @@ void MemoryPressureMonitor::CheckMemoryPressure() {
// happen for moderate and critical pressure levels.
DCHECK_NE(MemoryPressureListener::MEMORY_PRESSURE_LEVEL_NONE,
current_memory_pressure_level_);
- MemoryPressureListener::NotifyMemoryPressure(current_memory_pressure_level_);
+ dispatch_callback_(current_memory_pressure_level_);
}
void MemoryPressureMonitor::CheckMemoryPressureAndRecordStatistics() {
@@ -250,5 +250,9 @@ bool MemoryPressureMonitor::GetSystemMemoryStatus(
return true;
}
+void MemoryPressureMonitor::SetDispatchCallback(DispatchCallback callback) {
+ dispatch_callback_ = callback;
+}
+
} // namespace win
} // namespace base

Powered by Google App Engine
This is Rietveld 408576698