summaryrefslogtreecommitdiffstats
path: root/net/base/host_mapping_rules.cc
diff options
context:
space:
mode:
authormnissler@chromium.org <mnissler@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-09-10 08:18:46 +0000
committermnissler@chromium.org <mnissler@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-09-10 08:18:46 +0000
commit4493574d71becba0ad1cbb74ce600466cc4f33e0 (patch)
treef50e1a49a49043de9e134087cb98f3b337fdf3b1 /net/base/host_mapping_rules.cc
parenta15cbd47814d62163e2d66e64e7cb9e144fa5ca1 (diff)
downloadchromium_src-4493574d71becba0ad1cbb74ce600466cc4f33e0.zip
chromium_src-4493574d71becba0ad1cbb74ce600466cc4f33e0.tar.gz
chromium_src-4493574d71becba0ad1cbb74ce600466cc4f33e0.tar.bz2
Make the glob matcher support UTF8 strings.
This generalizes the existing pattern matching code to support UTF8 strings. BUG=53158 TEST=string_util_unittests.cc Review URL: http://codereview.chromium.org/3295018 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@59071 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/base/host_mapping_rules.cc')
-rw-r--r--net/base/host_mapping_rules.cc6
1 files changed, 3 insertions, 3 deletions
diff --git a/net/base/host_mapping_rules.cc b/net/base/host_mapping_rules.cc
index 56b9694..a535d14 100644
--- a/net/base/host_mapping_rules.cc
+++ b/net/base/host_mapping_rules.cc
@@ -19,7 +19,7 @@ bool HostMappingRules::RewriteHost(HostPortPair* host_port) const {
for (ExclusionRuleList::const_iterator it = exclusion_rules_.begin();
it != exclusion_rules_.end(); ++it) {
const ExclusionRule& rule = *it;
- if (MatchPatternASCII(host_port->host(), rule.hostname_pattern))
+ if (MatchPattern(host_port->host(), rule.hostname_pattern))
return false;
}
@@ -35,9 +35,9 @@ bool HostMappingRules::RewriteHost(HostPortPair* host_port) const {
// *.foo.com:1234
// First, we'll check for a match just on hostname.
// If that fails, we'll check for a match with both hostname and port.
- if (!MatchPatternASCII(host_port->host(), rule.hostname_pattern)) {
+ if (!MatchPattern(host_port->host(), rule.hostname_pattern)) {
std::string host_port_string = host_port->ToString();
- if (!MatchPatternASCII(host_port_string, rule.hostname_pattern))
+ if (!MatchPattern(host_port_string, rule.hostname_pattern))
continue; // This rule doesn't apply.
}