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

Unified Diff: base/memory/memory_pressure_monitor_mac.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_chromeos.cc ('k') | base/memory/memory_pressure_monitor_mac.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/memory/memory_pressure_monitor_mac.h
diff --git a/base/memory/memory_pressure_monitor_mac.h b/base/memory/memory_pressure_monitor_mac.h
index b975b6ecec84ceb3dddef50fa1730fcf387ef2b4..89794f67bdd183a948d1ac7b45091b8dc36de07e 100644
--- a/base/memory/memory_pressure_monitor_mac.h
+++ b/base/memory/memory_pressure_monitor_mac.h
@@ -28,15 +28,21 @@ class BASE_EXPORT MemoryPressureMonitor : public base::MemoryPressureMonitor {
// Returns the currently-observed memory pressure.
MemoryPressureLevel GetCurrentPressureLevel() const override;
+ void SetDispatchCallback(const DispatchCallback& callback) override;
+
private:
friend TestMemoryPressureMonitor;
static MemoryPressureLevel
MemoryPressureLevelForMacMemoryPressure(int mac_memory_pressure);
- static void NotifyMemoryPressureChanged(dispatch_source_s* event_source);
+ static void NotifyMemoryPressureChanged(
+ dispatch_source_s* event_source,
+ const DispatchCallback& dispatch_callback);
ScopedDispatchObject<dispatch_source_t> memory_level_event_source_;
+ DispatchCallback dispatch_callback_;
+
DISALLOW_COPY_AND_ASSIGN(MemoryPressureMonitor);
};
« no previous file with comments | « base/memory/memory_pressure_monitor_chromeos.cc ('k') | base/memory/memory_pressure_monitor_mac.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698