| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 "ios/chrome/browser/net/proxy_service_factory.h" | 5 #include "components/proxy_config/ios/proxy_service_factory.h" |
| 6 | 6 |
| 7 #include <utility> | 7 #include <utility> |
| 8 | 8 |
| 9 #include "base/memory/ptr_util.h" | 9 #include "base/memory/ptr_util.h" |
| 10 #include "components/proxy_config/pref_proxy_config_tracker_impl.h" | 10 #include "components/proxy_config/pref_proxy_config_tracker_impl.h" |
| 11 #include "ios/web/public/web_thread.h" | 11 #include "ios/web/public/web_thread.h" |
| 12 #include "net/proxy/proxy_config_service.h" | 12 #include "net/proxy/proxy_config_service.h" |
| 13 #include "net/proxy/proxy_service.h" | 13 #include "net/proxy/proxy_service.h" |
| 14 | 14 |
| 15 namespace ios { | |
| 16 | |
| 17 // static | 15 // static |
| 18 std::unique_ptr<net::ProxyConfigService> | 16 std::unique_ptr<net::ProxyConfigService> |
| 19 ProxyServiceFactory::CreateProxyConfigService(PrefProxyConfigTracker* tracker) { | 17 ProxyServiceFactory::CreateProxyConfigService(PrefProxyConfigTracker* tracker) { |
| 20 std::unique_ptr<net::ProxyConfigService> base_service( | 18 std::unique_ptr<net::ProxyConfigService> base_service( |
| 21 net::ProxyService::CreateSystemProxyConfigService( | 19 net::ProxyService::CreateSystemProxyConfigService( |
| 22 web::WebThread::GetTaskRunnerForThread(web::WebThread::IO), | 20 web::WebThread::GetTaskRunnerForThread(web::WebThread::IO), |
| 23 web::WebThread::GetTaskRunnerForThread(web::WebThread::FILE))); | 21 web::WebThread::GetTaskRunnerForThread(web::WebThread::FILE))); |
| 24 return tracker->CreateTrackingProxyConfigService(std::move(base_service)); | 22 return tracker->CreateTrackingProxyConfigService(std::move(base_service)); |
| 25 } | 23 } |
| 26 | 24 |
| (...skipping 23 matching lines...) Expand all Loading... |
| 50 net::NetworkDelegate* network_delegate, | 48 net::NetworkDelegate* network_delegate, |
| 51 std::unique_ptr<net::ProxyConfigService> proxy_config_service, | 49 std::unique_ptr<net::ProxyConfigService> proxy_config_service, |
| 52 bool quick_check_enabled) { | 50 bool quick_check_enabled) { |
| 53 DCHECK_CURRENTLY_ON(web::WebThread::IO); | 51 DCHECK_CURRENTLY_ON(web::WebThread::IO); |
| 54 std::unique_ptr<net::ProxyService> proxy_service( | 52 std::unique_ptr<net::ProxyService> proxy_service( |
| 55 net::ProxyService::CreateUsingSystemProxyResolver( | 53 net::ProxyService::CreateUsingSystemProxyResolver( |
| 56 std::move(proxy_config_service), net_log)); | 54 std::move(proxy_config_service), net_log)); |
| 57 proxy_service->set_quick_check_enabled(quick_check_enabled); | 55 proxy_service->set_quick_check_enabled(quick_check_enabled); |
| 58 return proxy_service; | 56 return proxy_service; |
| 59 } | 57 } |
| 60 | |
| 61 } // namespace ios | |
| OLD | NEW |