diff options
author | mpcomplete@chromium.org <mpcomplete@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-06-08 20:37:19 +0000 |
---|---|---|
committer | mpcomplete@chromium.org <mpcomplete@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-06-08 20:37:19 +0000 |
commit | 9f3fba5755542d0f9ac5f39540e771713dd666bb (patch) | |
tree | fc5fd4b8c4f9399213f038394267ca969ab9761c /content/browser/worker_host | |
parent | b42a9f62685ff25438ec0fd689e4b8952b70dd70 (diff) | |
download | chromium_src-9f3fba5755542d0f9ac5f39540e771713dd666bb.zip chromium_src-9f3fba5755542d0f9ac5f39540e771713dd666bb.tar.gz chromium_src-9f3fba5755542d0f9ac5f39540e771713dd666bb.tar.bz2 |
Remove last extension dependencies from content.
- UserScript reference from BufferedResourceHandler.
- ExtensionInfoMap references from RenderMessageFilter and WorkerProcessHost
and ResourceContext.
BUG=76697
Review URL: http://codereview.chromium.org/7135003
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@88388 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content/browser/worker_host')
-rw-r--r-- | content/browser/worker_host/worker_process_host.cc | 22 |
1 files changed, 9 insertions, 13 deletions
diff --git a/content/browser/worker_host/worker_process_host.cc b/content/browser/worker_host/worker_process_host.cc index 83ec00b..8dc2e1a 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 embedder first crack at special casing the title. + 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(); |