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

Unified Diff: base/memory/memory_pressure_listener.h

Issue 1312163003: Add method for suppressing MemoryPressureListener notifications (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address thestig's comments Created 5 years, 3 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/base.gyp ('k') | base/memory/memory_pressure_listener.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/memory/memory_pressure_listener.h
diff --git a/base/memory/memory_pressure_listener.h b/base/memory/memory_pressure_listener.h
index 6adaeeed7fd272224b43fd63eb0a5ffc36416abd..83d47d7097e7949e2872a8aba38fc2be5dd46ae2 100644
--- a/base/memory/memory_pressure_listener.h
+++ b/base/memory/memory_pressure_listener.h
@@ -72,6 +72,12 @@ class BASE_EXPORT MemoryPressureListener {
// Intended for use by the platform specific implementation.
static void NotifyMemoryPressure(MemoryPressureLevel memory_pressure_level);
+ // These methods should not be used anywhere else but in memory measurement
+ // code, where they are intended to maintain stable conditions across
+ // measurements.
+ static bool AreNotificationsSuppressed();
+ static void SetNotificationsSuppressed(bool suppressed);
+
private:
void Notify(MemoryPressureLevel memory_pressure_level);
« no previous file with comments | « base/base.gyp ('k') | base/memory/memory_pressure_listener.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698