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

Unified Diff: base/memory/memory_pressure_monitor_chromeos.h

Issue 2434103003: Add Mac memory pressure statistic reporting and consolidate platform code (Closed)
Patch Set: Add radar ID Created 4 years, 1 month 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.cc ('k') | base/memory/memory_pressure_monitor_chromeos.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/memory/memory_pressure_monitor_chromeos.h
diff --git a/base/memory/memory_pressure_monitor_chromeos.h b/base/memory/memory_pressure_monitor_chromeos.h
index 1000f30098792254a851d562000e53746f042916..88dccc9df8e3e16507b7b624d0ecc836af584934 100644
--- a/base/memory/memory_pressure_monitor_chromeos.h
+++ b/base/memory/memory_pressure_monitor_chromeos.h
@@ -101,6 +101,13 @@ class BASE_EXPORT MemoryPressureMonitor : public base::MemoryPressureMonitor {
// gets used to count the number of events since the last event occured.
int moderate_pressure_repeat_count_;
+ // The "Memory.PressureLevel" statistic is recorded every
+ // 5 seconds, but the timer to report "ChromeOS.MemoryPressureLevel"
+ // fires every second. This counter is used to allow reporting
+ // "Memory.PressureLevel" correctly without adding another
+ // timer.
+ int seconds_since_reporting_;
+
// The thresholds for moderate and critical pressure.
const int moderate_pressure_threshold_percent_;
const int critical_pressure_threshold_percent_;
« no previous file with comments | « base/memory/memory_pressure_monitor.cc ('k') | base/memory/memory_pressure_monitor_chromeos.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698