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

Unified Diff: content/browser/memory/memory_coordinator.h

Issue 2376233005: [NotForReview] An idea for experimenting purge & suspend (Closed)
Patch Set: Created 4 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 | « no previous file | content/browser/memory/memory_coordinator.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/memory/memory_coordinator.h
diff --git a/content/browser/memory/memory_coordinator.h b/content/browser/memory/memory_coordinator.h
index f674ef5b48ce950e5c442c24e73aef850940251d..b2dad739903383d41482f283273ae8199f7eb62e 100644
--- a/content/browser/memory/memory_coordinator.h
+++ b/content/browser/memory/memory_coordinator.h
@@ -26,6 +26,9 @@ class CONTENT_EXPORT MemoryCoordinator {
public:
~MemoryCoordinator();
+ // Returns true when memory coordinator is enabled.
+ static bool IsEnabled();
+
// Singleton factory/accessor.
static MemoryCoordinator* GetInstance();
@@ -46,6 +49,11 @@ class CONTENT_EXPORT MemoryCoordinator {
// if the process is not tracked by this coordinator.
mojom::MemoryState GetMemoryState(int render_process_id) const;
+ // Purges and suspends a child. This is an experimental mechanism and
+ // should not be exposed as an API. Returns true when memory coordinator
+ // sends a request to purge and suspend to the child process.
+ bool PurgeAndSuspendChild(int render_process_id);
+
protected:
// Constructor. Protected as this is a singleton, but accessible for
// unittests.
« no previous file with comments | « no previous file | content/browser/memory/memory_coordinator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698