| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "net/base/host_mapping_rules.h" | 5 #include "net/base/host_mapping_rules.h" |
| 6 | 6 |
| 7 #include "base/logging.h" | 7 #include "base/logging.h" |
| 8 #include "base/string_split.h" |
| 8 #include "base/string_tokenizer.h" | 9 #include "base/string_tokenizer.h" |
| 9 #include "base/string_util.h" | 10 #include "base/string_util.h" |
| 10 #include "net/base/host_port_pair.h" | 11 #include "net/base/host_port_pair.h" |
| 11 #include "net/base/net_util.h" | 12 #include "net/base/net_util.h" |
| 12 | 13 |
| 13 namespace net { | 14 namespace net { |
| 14 | 15 |
| 15 struct HostMappingRules::MapRule { | 16 struct HostMappingRules::MapRule { |
| 16 MapRule() : replacement_port(-1) {} | 17 MapRule() : replacement_port(-1) {} |
| 17 | 18 |
| (...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 100 map_rules_.clear(); | 101 map_rules_.clear(); |
| 101 | 102 |
| 102 StringTokenizer rules(rules_string, ","); | 103 StringTokenizer rules(rules_string, ","); |
| 103 while (rules.GetNext()) { | 104 while (rules.GetNext()) { |
| 104 bool ok = AddRuleFromString(rules.token()); | 105 bool ok = AddRuleFromString(rules.token()); |
| 105 LOG_IF(ERROR, !ok) << "Failed parsing rule: " << rules.token(); | 106 LOG_IF(ERROR, !ok) << "Failed parsing rule: " << rules.token(); |
| 106 } | 107 } |
| 107 } | 108 } |
| 108 | 109 |
| 109 } // namespace net | 110 } // namespace net |
| OLD | NEW |