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

Unified Diff: chrome/renderer/page_load_histograms.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/renderer/page_load_histograms.cc
diff --git a/chrome/renderer/page_load_histograms.cc b/chrome/renderer/page_load_histograms.cc
index 729677c97bd51d7f5eb1daedd2f8bab795dd972d..c63f020ebd7c6720a2327e267d86d8eda43f7cf6 100644
--- a/chrome/renderer/page_load_histograms.cc
+++ b/chrome/renderer/page_load_histograms.cc
@@ -179,16 +179,21 @@ bool ViaHeaderContains(WebFrame* frame, const std::string& via_value) {
// purposes.
// TODO(pmeenan): Remove the fuzzy logic when the referrer is reliable
bool IsFromGoogleSearchResult(const GURL& url, const GURL& referrer) {
- if (!base::StartsWithASCII(referrer.host(), "www.google.", true))
+ if (!base::StartsWith(referrer.host(), "www.google.",
+ base::CompareCase::SENSITIVE))
return false;
- if (base::StartsWithASCII(referrer.path(), "/url", true))
+ if (base::StartsWith(referrer.path(), "/url",
+ base::CompareCase::SENSITIVE))
return true;
bool is_possible_search_referrer =
referrer.path().empty() || referrer.path() == "/" ||
- base::StartsWithASCII(referrer.path(), "/search", true) ||
- base::StartsWithASCII(referrer.path(), "/webhp", true);
+ base::StartsWith(referrer.path(), "/search",
+ base::CompareCase::SENSITIVE) ||
+ base::StartsWith(referrer.path(), "/webhp",
+ base::CompareCase::SENSITIVE);
if (is_possible_search_referrer &&
- !base::StartsWithASCII(url.host(), "www.google", true))
+ !base::StartsWith(url.host(), "www.google",
+ base::CompareCase::SENSITIVE))
return true;
return false;
}

Powered by Google App Engine
This is Rietveld 408576698