| 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 "chrome/browser/net/proxy_service_factory.h" | 5 #include "chrome/browser/net/proxy_service_factory.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 #include <string> | 8 #include <string> |
| 9 #include <utility> | 9 #include <utility> |
| 10 | 10 |
| (...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 162 if (EnableOutOfProcessV8Pac(command_line)) { | 162 if (EnableOutOfProcessV8Pac(command_line)) { |
| 163 proxy_service = net::CreateProxyServiceUsingMojoFactory( | 163 proxy_service = net::CreateProxyServiceUsingMojoFactory( |
| 164 UtilityProcessMojoProxyResolverFactory::GetInstance(), | 164 UtilityProcessMojoProxyResolverFactory::GetInstance(), |
| 165 std::move(proxy_config_service), | 165 std::move(proxy_config_service), |
| 166 new net::ProxyScriptFetcherImpl(context), | 166 new net::ProxyScriptFetcherImpl(context), |
| 167 std::move(dhcp_proxy_script_fetcher), context->host_resolver(), | 167 std::move(dhcp_proxy_script_fetcher), context->host_resolver(), |
| 168 net_log, network_delegate); | 168 net_log, network_delegate); |
| 169 } | 169 } |
| 170 #endif // !defined(OS_ANDROID) | 170 #endif // !defined(OS_ANDROID) |
| 171 | 171 |
| 172 #if 0 // TODO XXX |
| 172 if (!proxy_service) { | 173 if (!proxy_service) { |
| 173 proxy_service = net::CreateProxyServiceUsingV8ProxyResolver( | 174 proxy_service = net::CreateProxyServiceUsingV8ProxyResolver( |
| 174 std::move(proxy_config_service), | 175 std::move(proxy_config_service), |
| 175 new net::ProxyScriptFetcherImpl(context), | 176 new net::ProxyScriptFetcherImpl(context), |
| 176 std::move(dhcp_proxy_script_fetcher), context->host_resolver(), | 177 std::move(dhcp_proxy_script_fetcher), context->host_resolver(), |
| 177 net_log, network_delegate); | 178 net_log, network_delegate); |
| 178 } | 179 } |
| 180 #endif |
| 179 } else { | 181 } else { |
| 180 proxy_service = net::ProxyService::CreateUsingSystemProxyResolver( | 182 proxy_service = net::ProxyService::CreateUsingSystemProxyResolver( |
| 181 std::move(proxy_config_service), num_pac_threads, net_log); | 183 std::move(proxy_config_service), num_pac_threads, net_log); |
| 182 } | 184 } |
| 183 | 185 |
| 184 proxy_service->set_quick_check_enabled(quick_check_enabled); | 186 proxy_service->set_quick_check_enabled(quick_check_enabled); |
| 185 proxy_service->set_sanitize_url_policy( | 187 proxy_service->set_sanitize_url_policy( |
| 186 pac_https_url_stripping_enabled | 188 pac_https_url_stripping_enabled |
| 187 ? net::ProxyService::SanitizeUrlPolicy::SAFE | 189 ? net::ProxyService::SanitizeUrlPolicy::SAFE |
| 188 : net::ProxyService::SanitizeUrlPolicy::UNSAFE); | 190 : net::ProxyService::SanitizeUrlPolicy::UNSAFE); |
| 189 | 191 |
| 190 return proxy_service; | 192 return proxy_service; |
| 191 } | 193 } |
| OLD | NEW |