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

Unified Diff: chromecast/browser/cast_memory_pressure_monitor.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: chromecast/browser/cast_memory_pressure_monitor.h
diff --git a/chromecast/browser/cast_memory_pressure_monitor.h b/chromecast/browser/cast_memory_pressure_monitor.h
index b24702c1ba02437a8c884aee1ee8d1ca5e9ba25d..22b48392e9905cdaf57225040bb07aed661f4c77 100644
--- a/chromecast/browser/cast_memory_pressure_monitor.h
+++ b/chromecast/browser/cast_memory_pressure_monitor.h
@@ -22,6 +22,7 @@ class CastMemoryPressureMonitor : public base::MemoryPressureMonitor {
// base::MemoryPressureMonitor implementation:
MemoryPressureLevel GetCurrentPressureLevel() const override;
+ void SetDispatchCallback(DispatchCallback callback) override;
private:
void PollPressureLevel();
@@ -30,6 +31,8 @@ class CastMemoryPressureMonitor : public base::MemoryPressureMonitor {
MemoryPressureLevel current_level_;
const int system_reserved_kb_;
base::WeakPtrFactory<CastMemoryPressureMonitor> weak_ptr_factory_;
+ DispatchCallback dispatch_callback_ =
+ &base::MemoryPressureListener::NotifyMemoryPressure;
DISALLOW_COPY_AND_ASSIGN(CastMemoryPressureMonitor);
};

Powered by Google App Engine
This is Rietveld 408576698