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

Side by Side Diff: net/proxy/proxy_service.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/proxy/proxy_config.cc ('k') | net/quic/quic_chromium_client_session.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_service.h" 5 #include "net/proxy/proxy_service.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <cmath> 8 #include <cmath>
9 #include <utility> 9 #include <utility>
10 10
(...skipping 300 matching lines...) Expand 10 before | Expand all | Expand 10 after
311 } 311 }
312 312
313 std::unique_ptr<base::Value> NetLogBadProxyListCallback( 313 std::unique_ptr<base::Value> NetLogBadProxyListCallback(
314 const ProxyRetryInfoMap* retry_info, 314 const ProxyRetryInfoMap* retry_info,
315 NetLogCaptureMode /* capture_mode */) { 315 NetLogCaptureMode /* capture_mode */) {
316 std::unique_ptr<base::DictionaryValue> dict(new base::DictionaryValue()); 316 std::unique_ptr<base::DictionaryValue> dict(new base::DictionaryValue());
317 base::ListValue* list = new base::ListValue(); 317 base::ListValue* list = new base::ListValue();
318 318
319 for (ProxyRetryInfoMap::const_iterator iter = retry_info->begin(); 319 for (ProxyRetryInfoMap::const_iterator iter = retry_info->begin();
320 iter != retry_info->end(); ++iter) { 320 iter != retry_info->end(); ++iter) {
321 list->Append(new base::StringValue(iter->first)); 321 list->AppendString(iter->first);
322 } 322 }
323 dict->Set("bad_proxy_list", list); 323 dict->Set("bad_proxy_list", list);
324 return std::move(dict); 324 return std::move(dict);
325 } 325 }
326 326
327 // Returns NetLog parameters on a successfuly proxy resolution. 327 // Returns NetLog parameters on a successfuly proxy resolution.
328 std::unique_ptr<base::Value> NetLogFinishedResolvingProxyCallback( 328 std::unique_ptr<base::Value> NetLogFinishedResolvingProxyCallback(
329 const ProxyInfo* result, 329 const ProxyInfo* result,
330 NetLogCaptureMode /* capture_mode */) { 330 NetLogCaptureMode /* capture_mode */) {
331 std::unique_ptr<base::DictionaryValue> dict(new base::DictionaryValue()); 331 std::unique_ptr<base::DictionaryValue> dict(new base::DictionaryValue());
(...skipping 1346 matching lines...) Expand 10 before | Expand all | Expand 10 after
1678 State previous_state = ResetProxyConfig(false); 1678 State previous_state = ResetProxyConfig(false);
1679 if (previous_state != STATE_NONE) 1679 if (previous_state != STATE_NONE)
1680 ApplyProxyConfigIfAvailable(); 1680 ApplyProxyConfigIfAvailable();
1681 } 1681 }
1682 1682
1683 void ProxyService::OnDNSChanged() { 1683 void ProxyService::OnDNSChanged() {
1684 OnIPAddressChanged(); 1684 OnIPAddressChanged();
1685 } 1685 }
1686 1686
1687 } // namespace net 1687 } // namespace net
OLDNEW
« no previous file with comments | « net/proxy/proxy_config.cc ('k') | net/quic/quic_chromium_client_session.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698