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

Unified Diff: components/sessions/content/content_serialized_navigation_driver.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
« no previous file with comments | « components/search_engines/template_url_service.cc ('k') | components/url_formatter/url_formatter.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/sessions/content/content_serialized_navigation_driver.cc
diff --git a/components/sessions/content/content_serialized_navigation_driver.cc b/components/sessions/content/content_serialized_navigation_driver.cc
index 8f4d47bd3fe97515e1c7f9ffdfd4e914abb3c7f7..7aa7de842ae547e4dd3a9187bfb839690088165e 100644
--- a/components/sessions/content/content_serialized_navigation_driver.cc
+++ b/components/sessions/content/content_serialized_navigation_driver.cc
@@ -21,8 +21,8 @@ const int kObsoleteReferrerPolicyOrigin = 3;
bool IsUberOrUberReplacementURL(const GURL& url) {
return url.SchemeIs(content::kChromeUIScheme) &&
- (url.host() == content::kChromeUIHistoryHost ||
- url.host() == content::kChromeUIUberHost);
+ (url.host_piece() == content::kChromeUIHistoryHost ||
+ url.host_piece() == content::kChromeUIUberHost);
}
} // namespace
@@ -131,8 +131,8 @@ void ContentSerializedNavigationDriver::Sanitize(
#if defined(OS_ANDROID)
// Rewrite the old new tab and welcome page URLs to the new NTP URL.
if (navigation->virtual_url_.SchemeIs(content::kChromeUIScheme) &&
- (navigation->virtual_url_.host() == "welcome" ||
- navigation->virtual_url_.host() == "newtab")) {
+ (navigation->virtual_url_.host_piece() == "welcome" ||
+ navigation->virtual_url_.host_piece() == "newtab")) {
navigation->virtual_url_ = GURL("chrome-native://newtab/");
navigation->original_request_url_ = navigation->virtual_url_;
navigation->encoded_page_state_ = content::PageState::CreateFromURL(
« no previous file with comments | « components/search_engines/template_url_service.cc ('k') | components/url_formatter/url_formatter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698