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_script_decider.h" | 5 #include "net/proxy/proxy_script_decider.h" |
6 | 6 |
| 7 #include <utility> |
| 8 |
7 #include "base/bind.h" | 9 #include "base/bind.h" |
8 #include "base/bind_helpers.h" | 10 #include "base/bind_helpers.h" |
9 #include "base/compiler_specific.h" | 11 #include "base/compiler_specific.h" |
10 #include "base/format_macros.h" | 12 #include "base/format_macros.h" |
11 #include "base/logging.h" | 13 #include "base/logging.h" |
12 #include "base/metrics/histogram_macros.h" | 14 #include "base/metrics/histogram_macros.h" |
13 #include "base/strings/string_util.h" | 15 #include "base/strings/string_util.h" |
14 #include "base/strings/utf_string_conversions.h" | 16 #include "base/strings/utf_string_conversions.h" |
15 #include "base/values.h" | 17 #include "base/values.h" |
16 #include "net/base/net_errors.h" | 18 #include "net/base/net_errors.h" |
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
65 case PacSource::WPAD_DNS: | 67 case PacSource::WPAD_DNS: |
66 source = "WPAD DNS: "; | 68 source = "WPAD DNS: "; |
67 source += effective_pac_url->possibly_invalid_spec(); | 69 source += effective_pac_url->possibly_invalid_spec(); |
68 break; | 70 break; |
69 case PacSource::CUSTOM: | 71 case PacSource::CUSTOM: |
70 source = "Custom PAC URL: "; | 72 source = "Custom PAC URL: "; |
71 source += effective_pac_url->possibly_invalid_spec(); | 73 source += effective_pac_url->possibly_invalid_spec(); |
72 break; | 74 break; |
73 } | 75 } |
74 dict->SetString("source", source); | 76 dict->SetString("source", source); |
75 return dict.Pass(); | 77 return std::move(dict); |
76 } | 78 } |
77 | 79 |
78 ProxyScriptDecider::ProxyScriptDecider( | 80 ProxyScriptDecider::ProxyScriptDecider( |
79 ProxyScriptFetcher* proxy_script_fetcher, | 81 ProxyScriptFetcher* proxy_script_fetcher, |
80 DhcpProxyScriptFetcher* dhcp_proxy_script_fetcher, | 82 DhcpProxyScriptFetcher* dhcp_proxy_script_fetcher, |
81 NetLog* net_log) | 83 NetLog* net_log) |
82 : proxy_script_fetcher_(proxy_script_fetcher), | 84 : proxy_script_fetcher_(proxy_script_fetcher), |
83 dhcp_proxy_script_fetcher_(dhcp_proxy_script_fetcher), | 85 dhcp_proxy_script_fetcher_(dhcp_proxy_script_fetcher), |
84 current_pac_source_index_(0u), | 86 current_pac_source_index_(0u), |
85 pac_mandatory_(false), | 87 pac_mandatory_(false), |
(...skipping 384 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
470 } | 472 } |
471 | 473 |
472 // This is safe to call in any state. | 474 // This is safe to call in any state. |
473 if (dhcp_proxy_script_fetcher_) | 475 if (dhcp_proxy_script_fetcher_) |
474 dhcp_proxy_script_fetcher_->Cancel(); | 476 dhcp_proxy_script_fetcher_->Cancel(); |
475 | 477 |
476 DidComplete(); | 478 DidComplete(); |
477 } | 479 } |
478 | 480 |
479 } // namespace net | 481 } // namespace net |
OLD | NEW |