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

Unified Diff: base/memory/memory_pressure_monitor_mac.h

Issue 2434103003: Add Mac memory pressure statistic reporting and consolidate platform code (Closed)
Patch Set: Created 4 years, 2 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_mac.h
diff --git a/base/memory/memory_pressure_monitor_mac.h b/base/memory/memory_pressure_monitor_mac.h
index 89794f67bdd183a948d1ac7b45091b8dc36de07e..279e5a819f40a709b6e28fb8ff5569bff17c3233 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,17 @@ 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 NotifyMemoryPressureChanged(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_;
+
DISALLOW_COPY_AND_ASSIGN(MemoryPressureMonitor);
};

Powered by Google App Engine
This is Rietveld 408576698