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

Unified Diff: net/proxy/proxy_bypass_rules.cc

Issue 1215933004: New new versions of Starts/EndsWith and SplitString in net (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@starts_with
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
« no previous file with comments | « net/http/http_util.cc ('k') | net/proxy/proxy_config_service_linux.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 9dc403150baedd8ee399b96d33a8b86e810b4510..cec4fb584950de76e06da62783ac0df884cde3bc 100644
--- a/net/proxy/proxy_bypass_rules.cc
+++ b/net/proxy/proxy_bypass_rules.cc
@@ -328,12 +328,13 @@ bool ProxyBypassRules::AddRuleFromStringInternal(
// Special-case hostnames that begin with a period.
// For example, we remap ".google.com" --> "*.google.com".
- if (base::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 && !base::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/http/http_util.cc ('k') | net/proxy/proxy_config_service_linux.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698