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

Unified Diff: content/browser/utility_process_host_impl.cc

Issue 972083002: Report utility process JS memory in task manager. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@v8-pac-oop
Patch Set: Clean up. Created 5 years, 8 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/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())

Powered by Google App Engine
This is Rietveld 408576698