| 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 "net/proxy/proxy_service.h" | 5 #include "net/proxy/proxy_service.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 | 8 |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/bind_helpers.h" | 10 #include "base/bind_helpers.h" |
| (...skipping 18 matching lines...) Expand all Loading... |
| 29 #include "net/proxy/proxy_resolver_js_bindings.h" | 29 #include "net/proxy/proxy_resolver_js_bindings.h" |
| 30 #include "net/proxy/proxy_resolver_v8.h" | 30 #include "net/proxy/proxy_resolver_v8.h" |
| 31 #include "net/proxy/proxy_script_decider.h" | 31 #include "net/proxy/proxy_script_decider.h" |
| 32 #include "net/proxy/proxy_script_fetcher.h" | 32 #include "net/proxy/proxy_script_fetcher.h" |
| 33 #include "net/proxy/sync_host_resolver_bridge.h" | 33 #include "net/proxy/sync_host_resolver_bridge.h" |
| 34 #include "net/url_request/url_request_context.h" | 34 #include "net/url_request/url_request_context.h" |
| 35 | 35 |
| 36 #if defined(OS_WIN) | 36 #if defined(OS_WIN) |
| 37 #include "net/proxy/proxy_config_service_win.h" | 37 #include "net/proxy/proxy_config_service_win.h" |
| 38 #include "net/proxy/proxy_resolver_winhttp.h" | 38 #include "net/proxy/proxy_resolver_winhttp.h" |
| 39 #elif defined(OS_IOS) |
| 40 #include "net/proxy/proxy_config_service_ios.h" |
| 41 #include "net/proxy/proxy_resolver_mac.h" |
| 39 #elif defined(OS_MACOSX) | 42 #elif defined(OS_MACOSX) |
| 40 #include "net/proxy/proxy_config_service_mac.h" | 43 #include "net/proxy/proxy_config_service_mac.h" |
| 41 #include "net/proxy/proxy_resolver_mac.h" | 44 #include "net/proxy/proxy_resolver_mac.h" |
| 42 #elif defined(OS_LINUX) && !defined(OS_CHROMEOS) | 45 #elif defined(OS_LINUX) && !defined(OS_CHROMEOS) |
| 43 #include "net/proxy/proxy_config_service_linux.h" | 46 #include "net/proxy/proxy_config_service_linux.h" |
| 44 #elif defined(OS_ANDROID) | 47 #elif defined(OS_ANDROID) |
| 45 #include "net/proxy/proxy_config_service_android.h" | 48 #include "net/proxy/proxy_config_service_android.h" |
| 46 #endif | 49 #endif |
| 47 | 50 |
| 48 using base::TimeDelta; | 51 using base::TimeDelta; |
| (...skipping 1352 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1401 ResetProxyConfig(false); | 1404 ResetProxyConfig(false); |
| 1402 ApplyProxyConfigIfAvailable(); | 1405 ApplyProxyConfigIfAvailable(); |
| 1403 } | 1406 } |
| 1404 | 1407 |
| 1405 // static | 1408 // static |
| 1406 ProxyConfigService* ProxyService::CreateSystemProxyConfigService( | 1409 ProxyConfigService* ProxyService::CreateSystemProxyConfigService( |
| 1407 base::SingleThreadTaskRunner* io_thread_task_runner, | 1410 base::SingleThreadTaskRunner* io_thread_task_runner, |
| 1408 MessageLoop* file_loop) { | 1411 MessageLoop* file_loop) { |
| 1409 #if defined(OS_WIN) | 1412 #if defined(OS_WIN) |
| 1410 return new ProxyConfigServiceWin(); | 1413 return new ProxyConfigServiceWin(); |
| 1414 #elif defined(OS_IOS) |
| 1415 return new ProxyConfigServiceIOS(io_thread_task_runner); |
| 1411 #elif defined(OS_MACOSX) | 1416 #elif defined(OS_MACOSX) |
| 1412 return new ProxyConfigServiceMac(io_thread_task_runner); | 1417 return new ProxyConfigServiceMac(io_thread_task_runner); |
| 1413 #elif defined(OS_CHROMEOS) | 1418 #elif defined(OS_CHROMEOS) |
| 1414 LOG(ERROR) << "ProxyConfigService for ChromeOS should be created in " | 1419 LOG(ERROR) << "ProxyConfigService for ChromeOS should be created in " |
| 1415 << "profile_io_data.cc::CreateProxyConfigService and this should " | 1420 << "profile_io_data.cc::CreateProxyConfigService and this should " |
| 1416 << "be used only for examples."; | 1421 << "be used only for examples."; |
| 1417 return new UnsetProxyConfigService; | 1422 return new UnsetProxyConfigService; |
| 1418 #elif defined(OS_LINUX) | 1423 #elif defined(OS_LINUX) |
| 1419 ProxyConfigServiceLinux* linux_config_service = | 1424 ProxyConfigServiceLinux* linux_config_service = |
| 1420 new ProxyConfigServiceLinux(); | 1425 new ProxyConfigServiceLinux(); |
| (...skipping 209 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1630 OnCompletion(result_); | 1635 OnCompletion(result_); |
| 1631 } | 1636 } |
| 1632 } | 1637 } |
| 1633 | 1638 |
| 1634 void SyncProxyServiceHelper::OnCompletion(int rv) { | 1639 void SyncProxyServiceHelper::OnCompletion(int rv) { |
| 1635 result_ = rv; | 1640 result_ = rv; |
| 1636 event_.Signal(); | 1641 event_.Signal(); |
| 1637 } | 1642 } |
| 1638 | 1643 |
| 1639 } // namespace net | 1644 } // namespace net |
| OLD | NEW |