OLD | NEW |
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 Loading... |
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 Loading... |
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 |
OLD | NEW |