| Index: net/base/net_util.cc
|
| diff --git a/net/base/net_util.cc b/net/base/net_util.cc
|
| index 26868a085365734c0019bfac045836007844733b..625950e2c6244fcce521b27a6e361277dba72266 100644
|
| --- a/net/base/net_util.cc
|
| +++ b/net/base/net_util.cc
|
| @@ -280,7 +280,9 @@ bool IsCanonicalizedHostCompliant(const std::string& host) {
|
|
|
| base::string16 StripWWW(const base::string16& text) {
|
| const base::string16 www(base::ASCIIToUTF16("www."));
|
| - return StartsWith(text, www, true) ? text.substr(www.length()) : text;
|
| + return base::StartsWith(text, www, base::CompareCase::SENSITIVE)
|
| + ? text.substr(www.length())
|
| + : text;
|
| }
|
|
|
| base::string16 StripWWWFromHost(const GURL& url) {
|
| @@ -707,7 +709,7 @@ void SetExplicitlyAllowedPorts(const std::string& allowed_ports) {
|
| // Overflow is still possible for evil user inputs.
|
| for (size_t i = 0; i <= size; ++i) {
|
| // The string should be composed of only digits and commas.
|
| - if (i != size && !IsAsciiDigit(allowed_ports[i]) &&
|
| + if (i != size && !base::IsAsciiDigit(allowed_ports[i]) &&
|
| (allowed_ports[i] != kComma))
|
| return;
|
| if (i == size || allowed_ports[i] == kComma) {
|
| @@ -1020,8 +1022,7 @@ bool IsLocalhostTLD(const std::string& host) {
|
| return false;
|
|
|
| const char* host_suffix = host.data() + host_len - kLocalhostTLDLength;
|
| - return base::strncasecmp(host_suffix, kLocalhostTLD, kLocalhostTLDLength) ==
|
| - 0;
|
| + return strncasecmp(host_suffix, kLocalhostTLD, kLocalhostTLDLength) == 0;
|
| }
|
|
|
| bool HasGoogleHost(const GURL& url) {
|
| @@ -1041,7 +1042,7 @@ bool HasGoogleHost(const GURL& url) {
|
| };
|
| const std::string& host = url.host();
|
| for (const char* suffix : kGoogleHostSuffixes) {
|
| - if (EndsWith(host, suffix, false))
|
| + if (base::EndsWith(host, suffix, base::CompareCase::INSENSITIVE_ASCII))
|
| return true;
|
| }
|
| return false;
|
|
|