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

Side by Side Diff: content/browser/worker_host/worker_process_host.cc

Issue 15140003: Add support for split Public Suffix List distinctions. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased again Created 7 years, 7 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « content/browser/site_instance_impl.cc ('k') | content/renderer/render_view_impl.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "content/browser/worker_host/worker_process_host.h" 5 #include "content/browser/worker_host/worker_process_host.h"
6 6
7 #include <set> 7 #include <set>
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 475 matching lines...) Expand 10 before | Expand all | Expand 10 after
486 } 486 }
487 487
488 void WorkerProcessHost::UpdateTitle() { 488 void WorkerProcessHost::UpdateTitle() {
489 std::set<std::string> titles; 489 std::set<std::string> titles;
490 for (Instances::iterator i = instances_.begin(); i != instances_.end(); ++i) { 490 for (Instances::iterator i = instances_.begin(); i != instances_.end(); ++i) {
491 // Allow the embedder first crack at special casing the title. 491 // Allow the embedder first crack at special casing the title.
492 std::string title = GetContentClient()->browser()-> 492 std::string title = GetContentClient()->browser()->
493 GetWorkerProcessTitle(i->url(), resource_context_); 493 GetWorkerProcessTitle(i->url(), resource_context_);
494 494
495 if (title.empty()) { 495 if (title.empty()) {
496 title = net::RegistryControlledDomainService::GetDomainAndRegistry( 496 title = net::registry_controlled_domains::GetDomainAndRegistry(
497 i->url()); 497 i->url(),
498 net::registry_controlled_domains::EXCLUDE_PRIVATE_REGISTRIES);
498 } 499 }
499 500
500 // Use the host name if the domain is empty, i.e. localhost or IP address. 501 // Use the host name if the domain is empty, i.e. localhost or IP address.
501 if (title.empty()) 502 if (title.empty())
502 title = i->url().host(); 503 title = i->url().host();
503 504
504 // If the host name is empty, i.e. file url, use the path. 505 // If the host name is empty, i.e. file url, use the path.
505 if (title.empty()) 506 if (title.empty())
506 title = i->url().path(); 507 title = i->url().path();
507 titles.insert(title); 508 titles.insert(title);
(...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after
690 return false; 691 return false;
691 } 692 }
692 693
693 WorkerProcessHost::WorkerInstance::FilterInfo 694 WorkerProcessHost::WorkerInstance::FilterInfo
694 WorkerProcessHost::WorkerInstance::GetFilter() const { 695 WorkerProcessHost::WorkerInstance::GetFilter() const {
695 DCHECK(NumFilters() == 1); 696 DCHECK(NumFilters() == 1);
696 return *filters_.begin(); 697 return *filters_.begin();
697 } 698 }
698 699
699 } // namespace content 700 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/site_instance_impl.cc ('k') | content/renderer/render_view_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698