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

Unified Diff: content/browser/worker_host/worker_process_host.cc

Issue 7135003: Remove last extension dependencies from content. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: review Created 9 years, 6 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/resource_context.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..8dc2e1ab3aeed55b1839da1d7500c58154e4e7b9 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();
« no previous file with comments | « content/browser/resource_context.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698