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

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

Issue 13979002: Add support for split PSL list distinctions. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixed chrome_frame compilation issue Created 7 years, 8 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
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 476 matching lines...) Expand 10 before | Expand all | Expand 10 after
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::RegistryControlledDomainService::GetDomainAndRegistry(
497 i->url()); 497 i->url(), net::RCDS::EXCLUDE_PRIVATE_REGISTRIES);
498 } 498 }
499 499
500 // Use the host name if the domain is empty, i.e. localhost or IP address. 500 // Use the host name if the domain is empty, i.e. localhost or IP address.
501 if (title.empty()) 501 if (title.empty())
502 title = i->url().host(); 502 title = i->url().host();
503 503
504 // If the host name is empty, i.e. file url, use the path. 504 // If the host name is empty, i.e. file url, use the path.
505 if (title.empty()) 505 if (title.empty())
506 title = i->url().path(); 506 title = i->url().path();
507 titles.insert(title); 507 titles.insert(title);
(...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after
690 return false; 690 return false;
691 } 691 }
692 692
693 WorkerProcessHost::WorkerInstance::FilterInfo 693 WorkerProcessHost::WorkerInstance::FilterInfo
694 WorkerProcessHost::WorkerInstance::GetFilter() const { 694 WorkerProcessHost::WorkerInstance::GetFilter() const {
695 DCHECK(NumFilters() == 1); 695 DCHECK(NumFilters() == 1);
696 return *filters_.begin(); 696 return *filters_.begin();
697 } 697 }
698 698
699 } // namespace content 699 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698