OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/proxy/proxy_bypass_rules.h" | 5 #include "net/proxy/proxy_bypass_rules.h" |
6 | 6 |
7 #include "base/stl_util.h" | 7 #include "base/stl_util.h" |
8 #include "base/strings/pattern.h" | 8 #include "base/strings/pattern.h" |
9 #include "base/strings/string_piece.h" | 9 #include "base/strings/string_piece.h" |
10 #include "base/strings/string_tokenizer.h" | 10 #include "base/strings/string_tokenizer.h" |
(...skipping 211 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
222 for (RuleList::const_iterator rule(rules_.begin()); | 222 for (RuleList::const_iterator rule(rules_.begin()); |
223 rule != rules_.end(); | 223 rule != rules_.end(); |
224 ++rule) { | 224 ++rule) { |
225 result += (*rule)->ToString(); | 225 result += (*rule)->ToString(); |
226 result += ";"; | 226 result += ";"; |
227 } | 227 } |
228 return result; | 228 return result; |
229 } | 229 } |
230 | 230 |
231 void ProxyBypassRules::Clear() { | 231 void ProxyBypassRules::Clear() { |
232 STLDeleteElements(&rules_); | 232 base::STLDeleteElements(&rules_); |
233 } | 233 } |
234 | 234 |
235 void ProxyBypassRules::AssignFrom(const ProxyBypassRules& other) { | 235 void ProxyBypassRules::AssignFrom(const ProxyBypassRules& other) { |
236 Clear(); | 236 Clear(); |
237 | 237 |
238 // Make a copy of the rules list. | 238 // Make a copy of the rules list. |
239 for (RuleList::const_iterator it = other.rules_.begin(); | 239 for (RuleList::const_iterator it = other.rules_.begin(); |
240 it != other.rules_.end(); ++it) { | 240 it != other.rules_.end(); ++it) { |
241 rules_.push_back((*it)->Clone()); | 241 rules_.push_back((*it)->Clone()); |
242 } | 242 } |
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
341 return AddRuleForHostname(scheme, raw, port); | 341 return AddRuleForHostname(scheme, raw, port); |
342 } | 342 } |
343 | 343 |
344 bool ProxyBypassRules::AddRuleFromStringInternalWithLogging( | 344 bool ProxyBypassRules::AddRuleFromStringInternalWithLogging( |
345 const std::string& raw, | 345 const std::string& raw, |
346 bool use_hostname_suffix_matching) { | 346 bool use_hostname_suffix_matching) { |
347 return AddRuleFromStringInternal(raw, use_hostname_suffix_matching); | 347 return AddRuleFromStringInternal(raw, use_hostname_suffix_matching); |
348 } | 348 } |
349 | 349 |
350 } // namespace net | 350 } // namespace net |
OLD | NEW |