Chromium Code Reviews| Index: net/base/host_mapping_rules.cc |
| diff --git a/net/base/host_mapping_rules.cc b/net/base/host_mapping_rules.cc |
| index f91f3fd0b4e7e2547123d50b72fe6ecbe5ce079a..feb5c52efa31b432e5d20c42880c2c09f73accb9 100644 |
| --- a/net/base/host_mapping_rules.cc |
| +++ b/net/base/host_mapping_rules.cc |
| @@ -25,14 +25,17 @@ struct HostMappingRules::ExclusionRule { |
| std::string hostname_pattern; |
| }; |
| -HostMappingRules::HostMappingRules() {} |
| +HostMappingRules::HostMappingRules() { |
| +} |
| -HostMappingRules::~HostMappingRules() {} |
| +HostMappingRules::~HostMappingRules() { |
| +} |
| bool HostMappingRules::RewriteHost(HostPortPair* host_port) const { |
| // Check if the hostname was excluded. |
| for (ExclusionRuleList::const_iterator it = exclusion_rules_.begin(); |
| - it != exclusion_rules_.end(); ++it) { |
| + it != exclusion_rules_.end(); |
| + ++it) { |
| const ExclusionRule& rule = *it; |
| if (MatchPattern(host_port->host(), rule.hostname_pattern)) |
| return false; |
| @@ -40,7 +43,8 @@ bool HostMappingRules::RewriteHost(HostPortPair* host_port) const { |
| // Check if the hostname was remapped. |
| for (MapRuleList::const_iterator it = map_rules_.begin(); |
| - it != map_rules_.end(); ++it) { |
| + it != map_rules_.end(); |
|
mef
2014/10/10 20:38:17
3 lines in for.
|
| + ++it) { |
| const MapRule& rule = *it; |
| // The rule's hostname_pattern will be something like: |
| @@ -84,8 +88,8 @@ bool HostMappingRules::AddRuleFromString(const std::string& rule_string) { |
| MapRule rule; |
| rule.hostname_pattern = base::StringToLowerASCII(parts[1]); |
| - if (!ParseHostAndPort(parts[2], &rule.replacement_hostname, |
| - &rule.replacement_port)) { |
| + if (!ParseHostAndPort( |
| + parts[2], &rule.replacement_hostname, &rule.replacement_port)) { |
| return false; // Failed parsing the hostname/port. |
| } |