| Index: net/base/host_mapping_rules.cc
|
| diff --git a/net/base/host_mapping_rules.cc b/net/base/host_mapping_rules.cc
|
| index 01b98b7b2445e200288759cdafdc252579aded97..a4be90602014d1f4c2607201876da8ac4ba3ca6a 100644
|
| --- a/net/base/host_mapping_rules.cc
|
| +++ b/net/base/host_mapping_rules.cc
|
| @@ -5,6 +5,7 @@
|
| #include "net/base/host_mapping_rules.h"
|
|
|
| #include "base/logging.h"
|
| +#include "base/strings/pattern.h"
|
| #include "base/strings/string_split.h"
|
| #include "base/strings/string_tokenizer.h"
|
| #include "base/strings/string_util.h"
|
| @@ -34,7 +35,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 (MatchPattern(host_port->host(), rule.hostname_pattern))
|
| + if (base::MatchPattern(host_port->host(), rule.hostname_pattern))
|
| return false;
|
| }
|
|
|
| @@ -50,9 +51,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 (!MatchPattern(host_port->host(), rule.hostname_pattern)) {
|
| + if (!base::MatchPattern(host_port->host(), rule.hostname_pattern)) {
|
| std::string host_port_string = host_port->ToString();
|
| - if (!MatchPattern(host_port_string, rule.hostname_pattern))
|
| + if (!base::MatchPattern(host_port_string, rule.hostname_pattern))
|
| continue; // This rule doesn't apply.
|
| }
|
|
|
| @@ -72,7 +73,7 @@ bool HostMappingRules::AddRuleFromString(const std::string& rule_string) {
|
| base::SplitString(trimmed, ' ', &parts);
|
|
|
| // Test for EXCLUSION rule.
|
| - if (parts.size() == 2 && LowerCaseEqualsASCII(parts[0], "exclude")) {
|
| + if (parts.size() == 2 && base::LowerCaseEqualsASCII(parts[0], "exclude")) {
|
| ExclusionRule rule;
|
| rule.hostname_pattern = base::StringToLowerASCII(parts[1]);
|
| exclusion_rules_.push_back(rule);
|
| @@ -80,7 +81,7 @@ bool HostMappingRules::AddRuleFromString(const std::string& rule_string) {
|
| }
|
|
|
| // Test for MAP rule.
|
| - if (parts.size() == 3 && LowerCaseEqualsASCII(parts[0], "map")) {
|
| + if (parts.size() == 3 && base::LowerCaseEqualsASCII(parts[0], "map")) {
|
| MapRule rule;
|
| rule.hostname_pattern = base::StringToLowerASCII(parts[1]);
|
|
|
|
|