summaryrefslogtreecommitdiffstats
path: root/chrome/browser/worker_host
diff options
context:
space:
mode:
authorjam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-05-20 05:42:59 +0000
committerjam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-05-20 05:42:59 +0000
commitcb58c8cffe58b6cb0aa357998179b7b03b41a8ec (patch)
treee0c88b269414ab34252c709df7bbc2aad68c3128 /chrome/browser/worker_host
parentf48ef0370d336fee1deb1c697c5c4d9b16e0c8d2 (diff)
downloadchromium_src-cb58c8cffe58b6cb0aa357998179b7b03b41a8ec.zip
chromium_src-cb58c8cffe58b6cb0aa357998179b7b03b41a8ec.tar.gz
chromium_src-cb58c8cffe58b6cb0aa357998179b7b03b41a8ec.tar.bz2
Show the extension name in the task manager for extension created worker processes.
BUG=30713 Review URL: http://codereview.chromium.org/2108015 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@47776 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/worker_host')
-rw-r--r--chrome/browser/worker_host/worker_process_host.cc13
1 files changed, 13 insertions, 0 deletions
diff --git a/chrome/browser/worker_host/worker_process_host.cc b/chrome/browser/worker_host/worker_process_host.cc
index 4c8a961..e7133bc 100644
--- a/chrome/browser/worker_host/worker_process_host.cc
+++ b/chrome/browser/worker_host/worker_process_host.cc
@@ -14,6 +14,8 @@
#include "base/string_util.h"
#include "chrome/browser/chrome_thread.h"
#include "chrome/browser/child_process_security_policy.h"
+#include "chrome/browser/net/chrome_url_request_context.h"
+#include "chrome/browser/profile.h"
#include "chrome/browser/renderer_host/database_dispatcher_host.h"
#include "chrome/browser/renderer_host/render_view_host.h"
#include "chrome/browser/renderer_host/render_view_host_delegate.h"
@@ -417,6 +419,17 @@ void WorkerProcessHost::UpdateTitle() {
// Use the host name if the domain is empty, i.e. localhost or IP address.
if (title.empty())
title = i->url().host();
+
+ // Check if it's an extension-created worker, in which case we want to use
+ // the name of the extension.
+ std::string extension_name = static_cast<ChromeURLRequestContext*>(
+ Profile::GetDefaultRequestContext()->GetURLRequestContext())->
+ GetNameForExtension(title);
+ if (!extension_name.empty()) {
+ titles.insert(extension_name);
+ continue;
+ }
+
// If the host name is empty, i.e. file url, use the path.
if (title.empty())
title = i->url().path();