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

Unified Diff: chrome/renderer/page_load_histograms.cc

Issue 1172183002: Move StartsWith[ASCII] to base namespace. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@string_util3
Patch Set: merger 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
« no previous file with comments | « chrome/renderer/extensions/webstore_bindings.cc ('k') | chrome/renderer/searchbox/searchbox_extension.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/renderer/page_load_histograms.cc
diff --git a/chrome/renderer/page_load_histograms.cc b/chrome/renderer/page_load_histograms.cc
index 0723709c4fa652c61ceae8b89d14d878b55fc8a4..729677c97bd51d7f5eb1daedd2f8bab795dd972d 100644
--- a/chrome/renderer/page_load_histograms.cc
+++ b/chrome/renderer/page_load_histograms.cc
@@ -179,17 +179,16 @@ 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 (!StartsWithASCII(referrer.host(), "www.google.", true))
+ if (!base::StartsWithASCII(referrer.host(), "www.google.", true))
return false;
- if (StartsWithASCII(referrer.path(), "/url", true))
+ if (base::StartsWithASCII(referrer.path(), "/url", true))
return true;
bool is_possible_search_referrer =
- referrer.path().empty() ||
- referrer.path() == "/" ||
- StartsWithASCII(referrer.path(), "/search", true) ||
- StartsWithASCII(referrer.path(), "/webhp", true);
+ referrer.path().empty() || referrer.path() == "/" ||
+ base::StartsWithASCII(referrer.path(), "/search", true) ||
+ base::StartsWithASCII(referrer.path(), "/webhp", true);
if (is_possible_search_referrer &&
- !StartsWithASCII(url.host(), "www.google", true))
+ !base::StartsWithASCII(url.host(), "www.google", true))
return true;
return false;
}
« no previous file with comments | « chrome/renderer/extensions/webstore_bindings.cc ('k') | chrome/renderer/searchbox/searchbox_extension.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698