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

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

Issue 2959383002: [GRC] Hook up the process-level CoordinationUnit (Closed)
Patch Set: Created 3 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
« no previous file with comments | « no previous file | content/public/app/mojo/content_browser_manifest.json » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 67c5e5d64a18b8230867611b904860f3603a688c..d81b8dfcc93b6a93509384882fa7a3d22845c636 100644
--- a/content/browser/renderer_host/render_process_host_impl.cc
+++ b/content/browser/renderer_host/render_process_host_impl.cc
@@ -853,6 +853,14 @@ class UnmatchedServiceWorkerProcessTracker
SiteProcessIDPairSet site_process_set_;
};
+void CreateResourceCoordinatorProcessInterface(
nasko 2017/06/29 17:24:28 nit: I'd move this to be closer to CreateMemoryCoo
lpy 2017/06/29 22:00:35 Done.
+ RenderProcessHostImpl* render_process_host,
+ const service_manager::BindSourceInfo& source_info,
+ resource_coordinator::mojom::CoordinationUnitRequest request) {
+ render_process_host->GetProcessResourceCoordinator()->service()->AddBinding(
+ std::move(request));
+}
+
} // namespace
RendererMainThreadFactoryFunction g_renderer_main_thread_factory = NULL;
@@ -1662,6 +1670,9 @@ void RenderProcessHostImpl::RegisterMojoInterfaces() {
registry->AddInterface(
base::Bind(&metrics::CreateSingleSampleMetricsProvider));
+ registry->AddInterface(base::Bind(&CreateResourceCoordinatorProcessInterface,
+ base::Unretained(this)));
nasko 2017/06/29 21:52:46 Let's make this conditional on the GRC feature bei
lpy 2017/06/29 22:00:35 Done.
+
if (base::FeatureList::IsEnabled(features::kOffMainThreadFetch)) {
scoped_refptr<ServiceWorkerContextWrapper> service_worker_context(
static_cast<ServiceWorkerContextWrapper*>(
« no previous file with comments | « no previous file | content/public/app/mojo/content_browser_manifest.json » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698