| 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 1350 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1361 void ProxyService::ForceReloadProxyConfig() { | 1361 void ProxyService::ForceReloadProxyConfig() { |
| 1362 DCHECK(CalledOnValidThread()); | 1362 DCHECK(CalledOnValidThread()); |
| 1363 ResetProxyConfig(false); | 1363 ResetProxyConfig(false); |
| 1364 ApplyProxyConfigIfAvailable(); | 1364 ApplyProxyConfigIfAvailable(); |
| 1365 } | 1365 } |
| 1366 | 1366 |
| 1367 // static | 1367 // static |
| 1368 ProxyConfigService* ProxyService::CreateSystemProxyConfigService( | 1368 ProxyConfigService* ProxyService::CreateSystemProxyConfigService( |
| 1369 base::SingleThreadTaskRunner* io_thread_task_runner, | 1369 base::SingleThreadTaskRunner* io_thread_task_runner, |
| 1370 base::MessageLoop* file_loop) { | 1370 base::MessageLoop* file_loop) { |
| 1371 #if defined(OS_WIN) | 1371 #if defined(USE_DIRECT_CONFIG_SERVICE) |
| 1372 return new ProxyConfigServiceDirect(); |
| 1373 #elif defined(OS_WIN) |
| 1372 return new ProxyConfigServiceWin(); | 1374 return new ProxyConfigServiceWin(); |
| 1373 #elif defined(OS_IOS) | 1375 #elif defined(OS_IOS) |
| 1374 return new ProxyConfigServiceIOS(); | 1376 return new ProxyConfigServiceIOS(); |
| 1375 #elif defined(OS_MACOSX) | 1377 #elif defined(OS_MACOSX) |
| 1376 return new ProxyConfigServiceMac(io_thread_task_runner); | 1378 return new ProxyConfigServiceMac(io_thread_task_runner); |
| 1377 #elif defined(OS_CHROMEOS) | 1379 #elif defined(OS_CHROMEOS) |
| 1378 LOG(ERROR) << "ProxyConfigService for ChromeOS should be created in " | 1380 LOG(ERROR) << "ProxyConfigService for ChromeOS should be created in " |
| 1379 << "profile_io_data.cc::CreateProxyConfigService and this should " | 1381 << "profile_io_data.cc::CreateProxyConfigService and this should " |
| 1380 << "be used only for examples."; | 1382 << "be used only for examples."; |
| 1381 return new UnsetProxyConfigService; | 1383 return new UnsetProxyConfigService; |
| (...skipping 256 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1638 OnCompletion(result_); | 1640 OnCompletion(result_); |
| 1639 } | 1641 } |
| 1640 } | 1642 } |
| 1641 | 1643 |
| 1642 void SyncProxyServiceHelper::OnCompletion(int rv) { | 1644 void SyncProxyServiceHelper::OnCompletion(int rv) { |
| 1643 result_ = rv; | 1645 result_ = rv; |
| 1644 event_.Signal(); | 1646 event_.Signal(); |
| 1645 } | 1647 } |
| 1646 | 1648 |
| 1647 } // namespace net | 1649 } // namespace net |
| OLD | NEW |