| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/string_number_conversions.h" | 8 #include "base/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 28 matching lines...) Expand all Loading... |
| 39 // be it from prefs or system (which is network flimflam on chromeos). | 39 // be it from prefs or system (which is network flimflam on chromeos). |
| 40 | 40 |
| 41 // For other platforms, create a baseline service that provides proxy | 41 // For other platforms, create a baseline service that provides proxy |
| 42 // configuration in case nothing is configured through prefs (Note: prefs | 42 // configuration in case nothing is configured through prefs (Note: prefs |
| 43 // include command line and configuration policy). | 43 // include command line and configuration policy). |
| 44 | 44 |
| 45 // TODO(port): the IO and FILE message loops are only used by Linux. Can | 45 // TODO(port): the IO and FILE message loops are only used by Linux. Can |
| 46 // that code be moved to chrome/browser instead of being in net, so that it | 46 // that code be moved to chrome/browser instead of being in net, so that it |
| 47 // can use BrowserThread instead of raw MessageLoop pointers? See bug 25354. | 47 // can use BrowserThread instead of raw MessageLoop pointers? See bug 25354. |
| 48 base_service = net::ProxyService::CreateSystemProxyConfigService( | 48 base_service = net::ProxyService::CreateSystemProxyConfigService( |
| 49 g_browser_process->io_thread()->message_loop(), | 49 BrowserThread::UnsafeGetMessageLoop(BrowserThread::IO), |
| 50 g_browser_process->file_thread()->message_loop()); | 50 BrowserThread::UnsafeGetMessageLoop(BrowserThread::FILE)); |
| 51 #endif // !defined(OS_CHROMEOS) | 51 #endif // !defined(OS_CHROMEOS) |
| 52 | 52 |
| 53 return new ChromeProxyConfigService(base_service); | 53 return new ChromeProxyConfigService(base_service); |
| 54 } | 54 } |
| 55 | 55 |
| 56 #if defined(OS_CHROMEOS) | 56 #if defined(OS_CHROMEOS) |
| 57 // static | 57 // static |
| 58 chromeos::ProxyConfigServiceImpl* | 58 chromeos::ProxyConfigServiceImpl* |
| 59 ProxyServiceFactory::CreatePrefProxyConfigTracker( | 59 ProxyServiceFactory::CreatePrefProxyConfigTracker( |
| 60 PrefService* pref_service) { | 60 PrefService* pref_service) { |
| (...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 117 context->network_delegate()); | 117 context->network_delegate()); |
| 118 } else { | 118 } else { |
| 119 proxy_service = net::ProxyService::CreateUsingSystemProxyResolver( | 119 proxy_service = net::ProxyService::CreateUsingSystemProxyResolver( |
| 120 proxy_config_service, | 120 proxy_config_service, |
| 121 num_pac_threads, | 121 num_pac_threads, |
| 122 net_log); | 122 net_log); |
| 123 } | 123 } |
| 124 | 124 |
| 125 return proxy_service; | 125 return proxy_service; |
| 126 } | 126 } |
| OLD | NEW |