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

Unified Diff: chrome/browser/ui/tabs/tab_strip_model.cc

Issue 2478573004: Convert GURL::{host,path} to GURL::{host_piece,path_piece} for ==. (Closed)
Patch Set: rebase to #431874 Created 4 years, 1 month 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
Index: chrome/browser/ui/tabs/tab_strip_model.cc
diff --git a/chrome/browser/ui/tabs/tab_strip_model.cc b/chrome/browser/ui/tabs/tab_strip_model.cc
index abc80825a1363838694a8bbafc05923ff24cdce6..b29c2094b15a60a7c9211d28ce462e25cb867058 100644
--- a/chrome/browser/ui/tabs/tab_strip_model.cc
+++ b/chrome/browser/ui/tabs/tab_strip_model.cc
@@ -1099,7 +1099,7 @@ void TabStripModel::GetIndicesWithSameDomain(int index,
for (int i = 0; i < count(); ++i) {
if (i == index)
continue;
- if (GetWebContentsAt(i)->GetURL().host() == domain)
+ if (GetWebContentsAt(i)->GetURL().host_piece() == domain)
indices->push_back(i);
}
}
@@ -1135,7 +1135,7 @@ std::vector<int> TabStripModel::GetIndicesForCommand(int index) const {
bool TabStripModel::IsNewTabAtEndOfTabStrip(WebContents* contents) const {
const GURL& url = contents->GetURL();
return url.SchemeIs(content::kChromeUIScheme) &&
- url.host() == chrome::kChromeUINewTabHost &&
+ url.host_piece() == chrome::kChromeUINewTabHost &&
contents == GetWebContentsAtImpl(count() - 1) &&
contents->GetController().GetEntryCount() == 1;
}
« no previous file with comments | « chrome/browser/ui/startup/startup_tab_provider.cc ('k') | chrome/browser/ui/webui/chrome_web_ui_controller_factory.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698