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

Unified Diff: chrome/browser/memory_purger.h

Issue 15995014: Adds MemoryPressureListener. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Joth's comments Created 7 years, 6 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: chrome/browser/memory_purger.h
diff --git a/chrome/browser/memory_purger.h b/chrome/browser/memory_purger.h
index 2d701b722679e59a189b8b45958fce46f3171b08..82b80c67fee1943761d5597377db6614fe06efa2 100644
--- a/chrome/browser/memory_purger.h
+++ b/chrome/browser/memory_purger.h
@@ -27,6 +27,10 @@ class MemoryPurger {
static void PurgeRenderers();
static void PurgeRendererForHost(content::RenderProcessHost* host);
+ // Call this to register for a MemoryPressure listener, so that PurgeAll()
+ // is called when the underlying platform send a low memory signal.
+ static void RegisterMemoryPressureListener();
+
private:
DISALLOW_IMPLICIT_CONSTRUCTORS(MemoryPurger);
};

Powered by Google App Engine
This is Rietveld 408576698