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

Unified Diff: chrome/common/search/search_urls.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/common/search/search_urls.cc
diff --git a/chrome/common/search/search_urls.cc b/chrome/common/search/search_urls.cc
index 03694abb8e958e0a18003faa48865d3add494f1b..eb32d38346ab83fb00e6c09d5e2997dc21783cfc 100644
--- a/chrome/common/search/search_urls.cc
+++ b/chrome/common/search/search_urls.cc
@@ -11,16 +11,17 @@ namespace search {
namespace {
bool MatchesOrigin(const GURL& my_url, const GURL& other_url) {
- return my_url.host() == other_url.host() &&
+ return my_url.host_piece() == other_url.host_piece() &&
my_url.port() == other_url.port() &&
- (my_url.scheme() == other_url.scheme() ||
+ (my_url.scheme_piece() == other_url.scheme_piece() ||
(my_url.SchemeIs(url::kHttpsScheme) &&
other_url.SchemeIs(url::kHttpScheme)));
}
} // namespace
bool MatchesOriginAndPath(const GURL& my_url, const GURL& other_url) {
- return MatchesOrigin(my_url, other_url) && my_url.path() == other_url.path();
+ return MatchesOrigin(my_url, other_url) &&
+ my_url.path_piece() == other_url.path_piece();
}
} // namespace search
« no previous file with comments | « chrome/browser/ui/webui/options/options_ui.cc ('k') | chrome/renderer/printing/chrome_print_web_view_helper_delegate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698