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

Side by Side Diff: chrome/browser/net/proxy_service_factory.cc

Issue 540593002: Use scoped_refptr<SingleThreadTaskRunner> when initializing ProxyConfigService (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 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
« no previous file with comments | « no previous file | chrome/service/net/service_url_request_context_getter.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/strings/string_number_conversions.h" 8 #include "base/strings/string_number_conversions.h"
9 #include "base/threading/thread.h" 9 #include "base/threading/thread.h"
10 #include "chrome/browser/browser_process.h" 10 #include "chrome/browser/browser_process.h"
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
47 // be it from prefs or system (which is network shill on chromeos). 47 // be it from prefs or system (which is network shill on chromeos).
48 48
49 // For other platforms, create a baseline service that provides proxy 49 // For other platforms, create a baseline service that provides proxy
50 // configuration in case nothing is configured through prefs (Note: prefs 50 // configuration in case nothing is configured through prefs (Note: prefs
51 // include command line and configuration policy). 51 // include command line and configuration policy).
52 52
53 // TODO(port): the IO and FILE message loops are only used by Linux. Can 53 // TODO(port): the IO and FILE message loops are only used by Linux. Can
54 // that code be moved to chrome/browser instead of being in net, so that it 54 // that code be moved to chrome/browser instead of being in net, so that it
55 // can use BrowserThread instead of raw MessageLoop pointers? See bug 25354. 55 // can use BrowserThread instead of raw MessageLoop pointers? See bug 25354.
56 base_service.reset(net::ProxyService::CreateSystemProxyConfigService( 56 base_service.reset(net::ProxyService::CreateSystemProxyConfigService(
57 BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO).get(), 57 BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO),
58 BrowserThread::UnsafeGetMessageLoopForThread(BrowserThread::FILE))); 58 BrowserThread::GetMessageLoopProxyForThread(BrowserThread::FILE)));
59 #endif // !defined(OS_CHROMEOS) 59 #endif // !defined(OS_CHROMEOS)
60 60
61 return tracker->CreateTrackingProxyConfigService(base_service.Pass()) 61 return tracker->CreateTrackingProxyConfigService(base_service.Pass())
62 .release(); 62 .release();
63 } 63 }
64 64
65 // static 65 // static
66 PrefProxyConfigTracker* 66 PrefProxyConfigTracker*
67 ProxyServiceFactory::CreatePrefProxyConfigTrackerOfProfile( 67 ProxyServiceFactory::CreatePrefProxyConfigTrackerOfProfile(
68 PrefService* profile_prefs, 68 PrefService* profile_prefs,
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
151 proxy_service = net::ProxyService::CreateUsingSystemProxyResolver( 151 proxy_service = net::ProxyService::CreateUsingSystemProxyResolver(
152 proxy_config_service, 152 proxy_config_service,
153 num_pac_threads, 153 num_pac_threads,
154 net_log); 154 net_log);
155 } 155 }
156 156
157 proxy_service->set_quick_check_enabled(quick_check_enabled); 157 proxy_service->set_quick_check_enabled(quick_check_enabled);
158 158
159 return proxy_service; 159 return proxy_service;
160 } 160 }
OLDNEW
« no previous file with comments | « no previous file | chrome/service/net/service_url_request_context_getter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698