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

Unified Diff: components/google/core/browser/google_util.cc

Issue 1242023005: Remove legacy StartsWithASCII function. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: y Created 5 years, 5 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: components/google/core/browser/google_util.cc
diff --git a/components/google/core/browser/google_util.cc b/components/google/core/browser/google_util.cc
index 1eada344379f84a53b771eb2efe6c097a6f63d84..2cdfe0536aada74cf6ef77b4ab39ecb30ac93a94 100644
--- a/components/google/core/browser/google_util.cc
+++ b/components/google/core/browser/google_util.cc
@@ -163,8 +163,8 @@ GURL CommandLineGoogleBaseURL() {
bool StartsWithCommandLineGoogleBaseURL(const GURL& url) {
GURL base_url(CommandLineGoogleBaseURL());
return base_url.is_valid() &&
- base::StartsWithASCII(url.possibly_invalid_spec(), base_url.spec(),
- true);
+ base::StartsWith(url.possibly_invalid_spec(), base_url.spec(),
+ base::CompareCase::SENSITIVE);
}
bool IsGoogleHostname(const std::string& host,
@@ -190,7 +190,8 @@ bool IsGoogleHomePageUrl(const GURL& url) {
// Make sure the path is a known home page path.
std::string path(url.path());
- return IsPathHomePageBase(path) || base::StartsWithASCII(path, "/ig", false);
+ return IsPathHomePageBase(path) ||
+ base::StartsWith(path, "/ig", base::CompareCase::INSENSITIVE_ASCII);
}
bool IsGoogleSearchUrl(const GURL& url) {
« no previous file with comments | « components/google/core/browser/google_url_tracker.cc ('k') | components/html_viewer/web_mime_registry_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698