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 5f842b1951c7e629bfd1e87ade66b280dcfe63c0..98ce63bdf1d774834832950b10e82f6470c781fd 100644 |
--- a/content/browser/renderer_host/render_process_host_impl.cc |
+++ b/content/browser/renderer_host/render_process_host_impl.cc |
@@ -1640,11 +1640,18 @@ void RenderProcessHostImpl::RegisterMojoInterfaces() { |
registry.get(), base::Bind(&CreateMemoryCoordinatorHandle, GetID())); |
} |
+ if (base::FeatureList::IsEnabled(features::kGlobalResourceCoordinator)) { |
+ AddUIThreadInterface(registry.get(), |
+ base::Bind(&CreateResourceCoordinatorProcessInterface, |
+ base::Unretained(this))); |
+ } |
+ |
registry->AddInterface( |
base::Bind(&MimeRegistryImpl::Create), |
base::CreateSequencedTaskRunnerWithTraits( |
{base::MayBlock(), base::TaskShutdownBehavior::SKIP_ON_SHUTDOWN, |
base::TaskPriority::USER_BLOCKING})); |
+ |
#if BUILDFLAG(USE_MINIKIN_HYPHENATION) |
registry->AddInterface(base::Bind(&hyphenation::HyphenationImpl::Create), |
hyphenation::HyphenationImpl::GetTaskRunner()); |
@@ -1671,11 +1678,6 @@ void RenderProcessHostImpl::RegisterMojoInterfaces() { |
registry->AddInterface( |
base::Bind(&metrics::CreateSingleSampleMetricsProvider)); |
- if (base::FeatureList::IsEnabled(features::kGlobalResourceCoordinator)) { |
- registry->AddInterface(base::Bind( |
- &CreateResourceCoordinatorProcessInterface, base::Unretained(this))); |
- } |
- |
if (base::FeatureList::IsEnabled(features::kOffMainThreadFetch)) { |
scoped_refptr<ServiceWorkerContextWrapper> service_worker_context( |
static_cast<ServiceWorkerContextWrapper*>( |
@@ -1919,14 +1921,10 @@ mojom::Renderer* RenderProcessHostImpl::GetRendererInterface() { |
resource_coordinator::ResourceCoordinatorInterface* |
RenderProcessHostImpl::GetProcessResourceCoordinator() { |
if (!process_resource_coordinator_) { |
- base::ProcessHandle process_handle = GetHandle(); |
- DCHECK(process_handle); |
- |
process_resource_coordinator_ = |
base::MakeUnique<resource_coordinator::ResourceCoordinatorInterface>( |
ServiceManagerConnection::GetForProcess()->GetConnector(), |
- resource_coordinator::CoordinationUnitType::kProcess, |
- base::Process(process_handle).Pid()); |
+ resource_coordinator::CoordinationUnitType::kProcess); |
} |
return process_resource_coordinator_.get(); |
} |