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

Side by Side Diff: components/proxy_config/ios/proxy_service_factory.cc

Issue 2944313003: Remove the dependence on BrowserThread::FILE for (Closed)
Patch Set: address mmenke's comments Created 3 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
OLDNEW
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 "components/proxy_config/ios/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 // static 15 // static
16 std::unique_ptr<net::ProxyConfigService> 16 std::unique_ptr<net::ProxyConfigService>
17 ProxyServiceFactory::CreateProxyConfigService(PrefProxyConfigTracker* tracker) { 17 ProxyServiceFactory::CreateProxyConfigService(PrefProxyConfigTracker* tracker) {
18 std::unique_ptr<net::ProxyConfigService> base_service( 18 std::unique_ptr<net::ProxyConfigService> base_service(
19 net::ProxyService::CreateSystemProxyConfigService( 19 net::ProxyService::CreateSystemProxyConfigService(
20 web::WebThread::GetTaskRunnerForThread(web::WebThread::IO), 20 web::WebThread::GetTaskRunnerForThread(web::WebThread::IO)));
21 web::WebThread::GetTaskRunnerForThread(web::WebThread::FILE)));
22 return tracker->CreateTrackingProxyConfigService(std::move(base_service)); 21 return tracker->CreateTrackingProxyConfigService(std::move(base_service));
23 } 22 }
24 23
25 // static 24 // static
26 std::unique_ptr<PrefProxyConfigTracker> 25 std::unique_ptr<PrefProxyConfigTracker>
27 ProxyServiceFactory::CreatePrefProxyConfigTrackerOfProfile( 26 ProxyServiceFactory::CreatePrefProxyConfigTrackerOfProfile(
28 PrefService* browser_state_prefs, 27 PrefService* browser_state_prefs,
29 PrefService* local_state_prefs) { 28 PrefService* local_state_prefs) {
30 return base::MakeUnique<PrefProxyConfigTrackerImpl>( 29 return base::MakeUnique<PrefProxyConfigTrackerImpl>(
31 browser_state_prefs, 30 browser_state_prefs,
(...skipping 16 matching lines...) Expand all
48 net::NetworkDelegate* network_delegate, 47 net::NetworkDelegate* network_delegate,
49 std::unique_ptr<net::ProxyConfigService> proxy_config_service, 48 std::unique_ptr<net::ProxyConfigService> proxy_config_service,
50 bool quick_check_enabled) { 49 bool quick_check_enabled) {
51 DCHECK_CURRENTLY_ON(web::WebThread::IO); 50 DCHECK_CURRENTLY_ON(web::WebThread::IO);
52 std::unique_ptr<net::ProxyService> proxy_service( 51 std::unique_ptr<net::ProxyService> proxy_service(
53 net::ProxyService::CreateUsingSystemProxyResolver( 52 net::ProxyService::CreateUsingSystemProxyResolver(
54 std::move(proxy_config_service), net_log)); 53 std::move(proxy_config_service), net_log));
55 proxy_service->set_quick_check_enabled(quick_check_enabled); 54 proxy_service->set_quick_check_enabled(quick_check_enabled);
56 return proxy_service; 55 return proxy_service;
57 } 56 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698