| Index: net/base/host_mapping_rules.cc
|
| diff --git a/net/base/host_mapping_rules.cc b/net/base/host_mapping_rules.cc
|
| index 6ae475458b0203d2f462b93fd17b748da3d06375..da8da1294d956b04fdc9b38cff0022cb67f1f5fa 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();
|
| + ++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 = 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.
|
| }
|
|
|
|
|