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 "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 29 matching lines...) Expand all Loading... |
40 // be it from prefs or system (which is network shill on chromeos). | 40 // be it from prefs or system (which is network shill on chromeos). |
41 | 41 |
42 // For other platforms, create a baseline service that provides proxy | 42 // For other platforms, create a baseline service that provides proxy |
43 // configuration in case nothing is configured through prefs (Note: prefs | 43 // configuration in case nothing is configured through prefs (Note: prefs |
44 // include command line and configuration policy). | 44 // include command line and configuration policy). |
45 | 45 |
46 // TODO(port): the IO and FILE message loops are only used by Linux. Can | 46 // TODO(port): the IO and FILE message loops are only used by Linux. Can |
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), | 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 #if defined(OS_CHROMEOS) | 57 #if defined(OS_CHROMEOS) |
58 // static | 58 // static |
59 chromeos::ProxyConfigServiceImpl* | 59 chromeos::ProxyConfigServiceImpl* |
60 ProxyServiceFactory::CreatePrefProxyConfigTracker( | 60 ProxyServiceFactory::CreatePrefProxyConfigTracker( |
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
126 #endif // defined(OS_IOS) | 126 #endif // defined(OS_IOS) |
127 } else { | 127 } else { |
128 proxy_service = net::ProxyService::CreateUsingSystemProxyResolver( | 128 proxy_service = net::ProxyService::CreateUsingSystemProxyResolver( |
129 proxy_config_service, | 129 proxy_config_service, |
130 num_pac_threads, | 130 num_pac_threads, |
131 net_log); | 131 net_log); |
132 } | 132 } |
133 | 133 |
134 return proxy_service; | 134 return proxy_service; |
135 } | 135 } |
OLD | NEW |