Index: content/browser/utility_process_host_impl.cc |
diff --git a/content/browser/utility_process_host_impl.cc b/content/browser/utility_process_host_impl.cc |
index f6b43bec6aadfa9eb37838196a9c5808b8a6492e..018f363ec7ff5bdc5d2824bac932b86354295992 100644 |
--- a/content/browser/utility_process_host_impl.cc |
+++ b/content/browser/utility_process_host_impl.cc |
@@ -27,6 +27,7 @@ |
#include "content/public/browser/utility_process_host_client.h" |
#include "content/public/common/content_switches.h" |
#include "content/public/common/process_type.h" |
+#include "content/public/common/resource_usage_reporter.mojom.h" |
#include "content/public/common/sandboxed_process_launcher_delegate.h" |
#include "ipc/ipc_switches.h" |
#include "ui/base/ui_base_switches.h" |
@@ -208,6 +209,11 @@ bool UtilityProcessHostImpl::StartProcess() { |
// launches a UtilityProcessHost. |
process_.reset(new BrowserChildProcessHostImpl(PROCESS_TYPE_UTILITY, this)); |
process_->SetName(name_); |
+ if (mojo_application_host_) { |
+ ResourceUsageReporterPtr service; |
+ GetServiceRegistry()->ConnectToRemoteService(&service); |
+ process_->SetResourceUsageReporter(service.Pass()); |
+ } |
std::string channel_id = process_->GetHost()->CreateChannel(); |
if (channel_id.empty()) |