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

Unified Diff: net/proxy/proxy_bypass_rules.cc

Issue 1841863002: Update monet. (Closed) Base URL: https://github.com/domokit/monet.git@master
Patch Set: Created 4 years, 9 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 | « net/proxy/polling_proxy_config_service.cc ('k') | net/proxy/proxy_config_service_android.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
« no previous file with comments | « net/proxy/polling_proxy_config_service.cc ('k') | net/proxy/proxy_config_service_android.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698