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

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

Issue 18112018: Cleanup the UseSharedProxies preference. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased. Created 7 years, 5 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 | Annotate | Revision Log
« no previous file with comments | « chrome/browser/net/proxy_service_factory.h ('k') | chrome/browser/prefs/browser_prefs.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 // that code be moved to chrome/browser instead of being in net, so that it 47 // that code be moved to chrome/browser instead of being in net, so that it
48 // can use BrowserThread instead of raw MessageLoop pointers? See bug 25354. 48 // can use BrowserThread instead of raw MessageLoop pointers? See bug 25354.
49 base_service = net::ProxyService::CreateSystemProxyConfigService( 49 base_service = net::ProxyService::CreateSystemProxyConfigService(
50 BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO).get(), 50 BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO).get(),
51 BrowserThread::UnsafeGetMessageLoopForThread(BrowserThread::FILE)); 51 BrowserThread::UnsafeGetMessageLoopForThread(BrowserThread::FILE));
52 #endif // !defined(OS_CHROMEOS) 52 #endif // !defined(OS_CHROMEOS)
53 53
54 return new ChromeProxyConfigService(base_service); 54 return new ChromeProxyConfigService(base_service);
55 } 55 }
56 56
57 // static
58 PrefProxyConfigTracker*
59 ProxyServiceFactory::CreatePrefProxyConfigTrackerOfProfile(
60 PrefService* profile_prefs,
61 PrefService* local_state_prefs) {
57 #if defined(OS_CHROMEOS) 62 #if defined(OS_CHROMEOS)
63 return new chromeos::ProxyConfigServiceImpl(profile_prefs, local_state_prefs);
64 #else
65 return new PrefProxyConfigTrackerImpl(profile_prefs);
66 #endif // defined(OS_CHROMEOS)
67 }
68
58 // static 69 // static
59 chromeos::ProxyConfigServiceImpl* 70 PrefProxyConfigTracker*
60 ProxyServiceFactory::CreatePrefProxyConfigTracker( 71 ProxyServiceFactory::CreatePrefProxyConfigTrackerOfLocalState(
61 PrefService* pref_service) { 72 PrefService* local_state_prefs) {
62 return new chromeos::ProxyConfigServiceImpl(pref_service); 73 #if defined(OS_CHROMEOS)
74 return new chromeos::ProxyConfigServiceImpl(NULL, local_state_prefs);
75 #else
76 return new PrefProxyConfigTrackerImpl(local_state_prefs);
77 #endif // defined(OS_CHROMEOS)
63 } 78 }
64 #else
65 // static
66 PrefProxyConfigTrackerImpl* ProxyServiceFactory::CreatePrefProxyConfigTracker(
67 PrefService* pref_service) {
68 return new PrefProxyConfigTrackerImpl(pref_service);
69 }
70 #endif // defined(OS_CHROMEOS)
71 79
72 // static 80 // static
73 net::ProxyService* ProxyServiceFactory::CreateProxyService( 81 net::ProxyService* ProxyServiceFactory::CreateProxyService(
74 net::NetLog* net_log, 82 net::NetLog* net_log,
75 net::URLRequestContext* context, 83 net::URLRequestContext* context,
76 net::NetworkDelegate* network_delegate, 84 net::NetworkDelegate* network_delegate,
77 net::ProxyConfigService* proxy_config_service, 85 net::ProxyConfigService* proxy_config_service,
78 const CommandLine& command_line) { 86 const CommandLine& command_line) {
79 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); 87 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
80 88
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
126 #endif // defined(OS_IOS) 134 #endif // defined(OS_IOS)
127 } else { 135 } else {
128 proxy_service = net::ProxyService::CreateUsingSystemProxyResolver( 136 proxy_service = net::ProxyService::CreateUsingSystemProxyResolver(
129 proxy_config_service, 137 proxy_config_service,
130 num_pac_threads, 138 num_pac_threads,
131 net_log); 139 net_log);
132 } 140 }
133 141
134 return proxy_service; 142 return proxy_service;
135 } 143 }
OLDNEW
« no previous file with comments | « chrome/browser/net/proxy_service_factory.h ('k') | chrome/browser/prefs/browser_prefs.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698