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

Side by Side Diff: net/proxy/proxy_bypass_rules.cc

Issue 2229393003: net: Use stl utilities from the base namespace (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebased Created 4 years, 4 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 unified diff | Download patch
« no previous file with comments | « net/proxy/mojo_proxy_resolver_impl.cc ('k') | net/proxy/proxy_config_service_win.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « net/proxy/mojo_proxy_resolver_impl.cc ('k') | net/proxy/proxy_config_service_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698