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

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

Issue 2037933002: Remove ListValue::Append(new {Fundamental,String}Value(...)) pattern in //net (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 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/http/transport_security_persister.cc ('k') | net/proxy/proxy_service.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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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_config.h" 5 #include "net/proxy/proxy_config.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/strings/string_tokenizer.h" 10 #include "base/strings/string_tokenizer.h"
(...skipping 263 matching lines...) Expand 10 before | Expand all | Expand 10 after
274 const ProxyBypassRules& bypass = proxy_rules_.bypass_rules; 274 const ProxyBypassRules& bypass = proxy_rules_.bypass_rules;
275 if (!bypass.rules().empty()) { 275 if (!bypass.rules().empty()) {
276 if (proxy_rules_.reverse_bypass) 276 if (proxy_rules_.reverse_bypass)
277 dict->SetBoolean("reverse_bypass", true); 277 dict->SetBoolean("reverse_bypass", true);
278 278
279 base::ListValue* list = new base::ListValue(); 279 base::ListValue* list = new base::ListValue();
280 280
281 for (ProxyBypassRules::RuleList::const_iterator it = 281 for (ProxyBypassRules::RuleList::const_iterator it =
282 bypass.rules().begin(); 282 bypass.rules().begin();
283 it != bypass.rules().end(); ++it) { 283 it != bypass.rules().end(); ++it) {
284 list->Append(new base::StringValue((*it)->ToString())); 284 list->AppendString((*it)->ToString());
285 } 285 }
286 286
287 dict->Set("bypass_list", list); 287 dict->Set("bypass_list", list);
288 } 288 }
289 } 289 }
290 290
291 // Output the source. 291 // Output the source.
292 dict->SetString("source", ProxyConfigSourceToString(source_)); 292 dict->SetString("source", ProxyConfigSourceToString(source_));
293 293
294 return dict; 294 return dict;
295 } 295 }
296 296
297 } // namespace net 297 } // namespace net
OLDNEW
« no previous file with comments | « net/http/transport_security_persister.cc ('k') | net/proxy/proxy_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698