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

Unified Diff: chrome/browser/prerender/prerender_util.cc

Issue 1220963005: Update base::StartsWith calls to new form (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@starts_with
Patch Set: Created 5 years, 6 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/prerender/prerender_util.cc
diff --git a/chrome/browser/prerender/prerender_util.cc b/chrome/browser/prerender/prerender_util.cc
index 1b60fcb74388351b99f7002460351f7ef202aee3..e708cfdb9675067b868f947ad15e57d34ef299c2 100644
--- a/chrome/browser/prerender/prerender_util.cc
+++ b/chrome/browser/prerender/prerender_util.cc
@@ -72,16 +72,18 @@ bool MaybeGetQueryStringBasedAliasURL(
}
bool IsGoogleDomain(const GURL& url) {
- return base::StartsWithASCII(url.host(), std::string("www.google."), true);
+ return base::StartsWith(url.host(), "www.google.",
+ base::CompareCase::SENSITIVE);
}
bool IsGoogleSearchResultURL(const GURL& url) {
if (!IsGoogleDomain(url))
return false;
return (url.path().empty() ||
- base::StartsWithASCII(url.path(), std::string("/search"), true) ||
+ base::StartsWith(url.path(), "/search",
+ base::CompareCase::SENSITIVE) ||
(url.path() == "/") ||
- base::StartsWithASCII(url.path(), std::string("/webhp"), true));
+ base::StartsWith(url.path(), "/webhp", base::CompareCase::SENSITIVE));
}
void ReportPrerenderExternalURL() {

Powered by Google App Engine
This is Rietveld 408576698