| 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 1346 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1357 // notifications (delivered in either |glib_default_loop| or | 1357 // notifications (delivered in either |glib_default_loop| or |
| 1358 // |file_loop|) to keep us updated when the proxy config changes. | 1358 // |file_loop|) to keep us updated when the proxy config changes. |
| 1359 linux_config_service->SetupAndFetchInitialConfig( | 1359 linux_config_service->SetupAndFetchInitialConfig( |
| 1360 glib_thread_task_runner, io_thread_task_runner, | 1360 glib_thread_task_runner, io_thread_task_runner, |
| 1361 static_cast<MessageLoopForIO*>(file_loop)); | 1361 static_cast<MessageLoopForIO*>(file_loop)); |
| 1362 | 1362 |
| 1363 return linux_config_service; | 1363 return linux_config_service; |
| 1364 #elif defined(OS_ANDROID) | 1364 #elif defined(OS_ANDROID) |
| 1365 return new ProxyConfigServiceAndroid( | 1365 return new ProxyConfigServiceAndroid( |
| 1366 io_thread_task_runner, | 1366 io_thread_task_runner, |
| 1367 MessageLoopForUI::current()->message_loop_proxy()); | 1367 MessageLoop::current()->message_loop_proxy()); |
| 1368 #else | 1368 #else |
| 1369 LOG(WARNING) << "Failed to choose a system proxy settings fetcher " | 1369 LOG(WARNING) << "Failed to choose a system proxy settings fetcher " |
| 1370 "for this platform."; | 1370 "for this platform."; |
| 1371 return new ProxyConfigServiceDirect(); | 1371 return new ProxyConfigServiceDirect(); |
| 1372 #endif | 1372 #endif |
| 1373 } | 1373 } |
| 1374 | 1374 |
| 1375 // static | 1375 // static |
| 1376 const ProxyService::PacPollPolicy* ProxyService::set_pac_script_poll_policy( | 1376 const ProxyService::PacPollPolicy* ProxyService::set_pac_script_poll_policy( |
| 1377 const PacPollPolicy* policy) { | 1377 const PacPollPolicy* policy) { |
| (...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1558 OnCompletion(result_); | 1558 OnCompletion(result_); |
| 1559 } | 1559 } |
| 1560 } | 1560 } |
| 1561 | 1561 |
| 1562 void SyncProxyServiceHelper::OnCompletion(int rv) { | 1562 void SyncProxyServiceHelper::OnCompletion(int rv) { |
| 1563 result_ = rv; | 1563 result_ = rv; |
| 1564 event_.Signal(); | 1564 event_.Signal(); |
| 1565 } | 1565 } |
| 1566 | 1566 |
| 1567 } // namespace net | 1567 } // namespace net |
| OLD | NEW |