Index: net/proxy/proxy_bypass_rules.cc |
diff --git a/net/proxy/proxy_bypass_rules.cc b/net/proxy/proxy_bypass_rules.cc |
index 970e3bbd6c89349b407d7047d659726810a30b47..64f3388f17416c43744249ea04285476e0cf1493 100644 |
--- a/net/proxy/proxy_bypass_rules.cc |
+++ b/net/proxy/proxy_bypass_rules.cc |
@@ -5,6 +5,7 @@ |
#include "net/proxy/proxy_bypass_rules.h" |
#include "base/stl_util.h" |
+#include "base/strings/pattern.h" |
#include "base/strings/string_number_conversions.h" |
#include "base/strings/string_piece.h" |
#include "base/strings/string_tokenizer.h" |
@@ -36,8 +37,8 @@ class HostnamePatternRule : public ProxyBypassRules::Rule { |
// Note it is necessary to lower-case the host, since GURL uses capital |
// letters for percent-escaped characters. |
- return MatchPattern(base::StringToLowerASCII(url.host()), |
- hostname_pattern_); |
+ return base::MatchPattern(base::StringToLowerASCII(url.host()), |
+ hostname_pattern_); |
} |
std::string ToString() const override { |
@@ -263,7 +264,7 @@ bool ProxyBypassRules::AddRuleFromStringInternal( |
// This is the special syntax used by WinInet's bypass list -- we allow it |
// on all platforms and interpret it the same way. |
- if (LowerCaseEqualsASCII(raw, "<local>")) { |
+ if (base::LowerCaseEqualsASCII(raw, "<local>")) { |
AddRuleToBypassLocal(); |
return true; |
} |
@@ -327,12 +328,13 @@ bool ProxyBypassRules::AddRuleFromStringInternal( |
// Special-case hostnames that begin with a period. |
// For example, we remap ".google.com" --> "*.google.com". |
- if (StartsWithASCII(raw, ".", false)) |
+ if (base::StartsWith(raw, ".", base::CompareCase::SENSITIVE)) |
raw = "*" + raw; |
// If suffix matching was asked for, make sure the pattern starts with a |
// wildcard. |
- if (use_hostname_suffix_matching && !StartsWithASCII(raw, "*", false)) |
+ if (use_hostname_suffix_matching && |
+ !base::StartsWith(raw, "*", base::CompareCase::SENSITIVE)) |
raw = "*" + raw; |
return AddRuleForHostname(scheme, raw, port); |