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

Unified Diff: content/browser/renderer_host/render_process_host_impl.cc

Issue 2094583002: Add MemoryCoordinator (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Use feature_list Created 4 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: content/browser/renderer_host/render_process_host_impl.cc
diff --git a/content/browser/renderer_host/render_process_host_impl.cc b/content/browser/renderer_host/render_process_host_impl.cc
index f859866b27795aadc62590287556e4b35e4f7702..66fc4ef5423b1853855fff03df1c53ecb1ef1660 100644
--- a/content/browser/renderer_host/render_process_host_impl.cc
+++ b/content/browser/renderer_host/render_process_host_impl.cc
@@ -44,6 +44,7 @@
#include "base/tracked_objects.h"
#include "build/build_config.h"
#include "cc/base/switches.h"
+#include "components/memory_coordinator/browser/memory_state_notifier.h"
#include "components/scheduler/common/scheduler_switches.h"
#include "components/tracing/common/tracing_switches.h"
#include "content/browser/appcache/appcache_dispatcher_host.h"
@@ -2561,6 +2562,13 @@ void RenderProcessHostImpl::OnProcessLaunched() {
child_process_launcher_->GetProcess().Handle());
}
+ if (memory_coordinator::IsEnabled() && mojo_application_host_) {
+ memory_coordinator::mojom::ChildMemoryCoordinatorPtr coordinator;
+ GetRemoteInterfaces()->GetInterface(&coordinator);
+ BrowserMainLoop::GetInstance()->memory_state_notifier()->AddChild(
+ std::move(coordinator));
+ }
+
// Not all platforms launch processes in the same backgrounded state. Make
// sure |is_process_backgrounded_| reflects this platform's initial process
// state.

Powered by Google App Engine
This is Rietveld 408576698