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

Unified Diff: content/browser/utility_process_host_impl.cc

Issue 960753003: Add a name to the proxy resolver utility process and display it in the task manager. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@v8-pac-oop
Patch Set: Add comment. Created 5 years, 9 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 | « content/browser/utility_process_host_impl.h ('k') | content/public/browser/utility_process_host.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 df1eb132cb1edcda762d5c709ddf1cbf6f87afdb..ed6c7d13604e8f5fae98cf3b5ace1869714fba79 100644
--- a/content/browser/utility_process_host_impl.cc
+++ b/content/browser/utility_process_host_impl.cc
@@ -106,7 +106,8 @@ UtilityProcessHostImpl::UtilityProcessHostImpl(
#else
child_flags_(ChildProcessHost::CHILD_NORMAL),
#endif
- started_(false) {
+ started_(false),
+ name_("utility process") {
}
UtilityProcessHostImpl::~UtilityProcessHostImpl() {
@@ -189,6 +190,10 @@ ServiceRegistry* UtilityProcessHostImpl::GetServiceRegistry() {
return mojo_application_host_->service_registry();
}
+void UtilityProcessHostImpl::SetName(const std::string& name) {
+ name_ = name;
+}
+
bool UtilityProcessHostImpl::StartProcess() {
if (started_)
return true;
@@ -200,7 +205,7 @@ bool UtilityProcessHostImpl::StartProcess() {
// Name must be set or metrics_service will crash in any test which
// launches a UtilityProcessHost.
process_.reset(new BrowserChildProcessHostImpl(PROCESS_TYPE_UTILITY, this));
- process_->SetName(base::ASCIIToUTF16("utility process"));
+ process_->SetName(base::UTF8ToUTF16(name_));
std::string channel_id = process_->GetHost()->CreateChannel();
if (channel_id.empty())
« no previous file with comments | « content/browser/utility_process_host_impl.h ('k') | content/public/browser/utility_process_host.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698