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 89794f67bdd183a948d1ac7b45091b8dc36de07e..9f89b1661a62bfed7898a0f4d825e7f5372b8d40 100644 |
--- a/base/memory/memory_pressure_monitor_mac.h |
+++ b/base/memory/memory_pressure_monitor_mac.h |
@@ -5,6 +5,7 @@ |
#ifndef BASE_MEMORY_MEMORY_PRESSURE_MONITOR_MAC_H_ |
#define BASE_MEMORY_MEMORY_PRESSURE_MONITOR_MAC_H_ |
+#include <CoreFoundation/CFDate.h> |
#include <dispatch/dispatch.h> |
#include "base/base_export.h" |
@@ -35,14 +36,22 @@ class BASE_EXPORT MemoryPressureMonitor : public base::MemoryPressureMonitor { |
static MemoryPressureLevel |
MemoryPressureLevelForMacMemoryPressure(int mac_memory_pressure); |
- static void NotifyMemoryPressureChanged( |
- dispatch_source_s* event_source, |
- const DispatchCallback& dispatch_callback); |
+ void OnMemoryPressureChanged(dispatch_source_s* event_source, |
+ const DispatchCallback& dispatch_callback); |
ScopedDispatchObject<dispatch_source_t> memory_level_event_source_; |
DispatchCallback dispatch_callback_; |
+ CFTimeInterval last_pressure_change_; |
+ |
+ MemoryPressureLevel last_pressure_level_; |
+ |
+ // The UMA statistic is recorded in 5 second increments. This |
+ // accumulates the remaining time to be rolled into the next |
+ // call. |
+ CFTimeInterval reporting_error_; |
+ |
DISALLOW_COPY_AND_ASSIGN(MemoryPressureMonitor); |
}; |