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

Unified Diff: net/base/host_mapping_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/base/filename_util_internal.cc ('k') | net/base/io_buffer.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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]);
« no previous file with comments | « net/base/filename_util_internal.cc ('k') | net/base/io_buffer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698