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

Unified Diff: net/base/net_util.cc

Issue 1239493005: Remove some legacy versions of StartsWith and EndsWith. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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: net/base/net_util.cc
diff --git a/net/base/net_util.cc b/net/base/net_util.cc
index 73fa5f287d2e909a262445e55da134126d5ac353..cd1471814f0f5f41108c889e67f63b6f594488b4 100644
--- a/net/base/net_util.cc
+++ b/net/base/net_util.cc
@@ -155,7 +155,7 @@ std::string NormalizeHostname(const std::string& host) {
}
bool IsNormalizedLocalhostTLD(const std::string& host) {
- return base::EndsWith(host, ".localhost", true);
+ return base::EndsWith(host, ".localhost", base::CompareCase::SENSITIVE);
}
// |host| should be normalized.
@@ -832,7 +832,7 @@ bool HasGoogleHost(const GURL& url) {
};
const std::string& host = url.host();
for (const char* suffix : kGoogleHostSuffixes) {
- if (base::EndsWith(host, suffix, false))
+ if (base::EndsWith(host, suffix, base::CompareCase::INSENSITIVE_ASCII))
return true;
}
return false;

Powered by Google App Engine
This is Rietveld 408576698