Chromium Code Reviews| Index: content/browser/worker_host/worker_process_host.cc |
| diff --git a/content/browser/worker_host/worker_process_host.cc b/content/browser/worker_host/worker_process_host.cc |
| index 83ec00b6b55d34adfc8b610acf1cf2f6d82a811b..f0894c9838b604fe815b4de8e3be131e5e0aee13 100644 |
| --- a/content/browser/worker_host/worker_process_host.cc |
| +++ b/content/browser/worker_host/worker_process_host.cc |
| @@ -12,7 +12,6 @@ |
| #include "base/message_loop.h" |
| #include "base/string_util.h" |
| #include "base/utf_string_conversions.h" |
| -#include "chrome/browser/extensions/extension_info_map.h" |
| #include "content/browser/appcache/appcache_dispatcher_host.h" |
| #include "content/browser/browser_thread.h" |
| #include "content/browser/child_process_security_policy.h" |
| @@ -457,22 +456,19 @@ bool WorkerProcessHost::CanShutdown() { |
| void WorkerProcessHost::UpdateTitle() { |
| std::set<std::string> titles; |
| for (Instances::iterator i = instances_.begin(); i != instances_.end(); ++i) { |
| - std::string title = |
| - net::RegistryControlledDomainService::GetDomainAndRegistry(i->url()); |
| + // Allow the content client first crack at special casing the title. |
|
jam
2011/06/08 00:18:17
nit: content client -> embedder
Matt Perry
2011/06/08 00:33:37
Done.
|
| + std::string title = content::GetContentClient()->browser()-> |
| + GetWorkerProcessTitle(i->url(), *resource_context_); |
| + |
| + if (title.empty()) { |
| + title = net::RegistryControlledDomainService::GetDomainAndRegistry( |
| + i->url()); |
| + } |
| + |
| // 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. |
| - // TODO(mpcomplete): move out of content. http:://crbug.com/76789 |
| - const Extension* extension = |
| - resource_context_->extension_info_map()->extensions().GetByID(title); |
| - if (extension) { |
| - 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(); |