| 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/socket/socks_client_socket_pool.h" | 5 #include "net/socket/socks_client_socket_pool.h" |
| 6 | 6 |
| 7 #include <utility> | 7 #include <utility> |
| 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 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 48 TransportClientSocketPool* transport_pool, | 48 TransportClientSocketPool* transport_pool, |
| 49 HostResolver* host_resolver, | 49 HostResolver* host_resolver, |
| 50 Delegate* delegate, | 50 Delegate* delegate, |
| 51 NetLog* net_log) | 51 NetLog* net_log) |
| 52 : ConnectJob( | 52 : ConnectJob( |
| 53 group_name, | 53 group_name, |
| 54 timeout_duration, | 54 timeout_duration, |
| 55 priority, | 55 priority, |
| 56 respect_limits, | 56 respect_limits, |
| 57 delegate, | 57 delegate, |
| 58 NetLogWithSource::Make(net_log, NetLogSourceType::CONNECT_JOB)), | 58 NetLogWithSource::Make(net_log, NetLogSourceType::SOCKS_CONNECT_JOB)), |
| 59 socks_params_(socks_params), | 59 socks_params_(socks_params), |
| 60 transport_pool_(transport_pool), | 60 transport_pool_(transport_pool), |
| 61 resolver_(host_resolver), | 61 resolver_(host_resolver), |
| 62 callback_( | 62 callback_( |
| 63 base::Bind(&SOCKSConnectJob::OnIOComplete, base::Unretained(this))) {} | 63 base::Bind(&SOCKSConnectJob::OnIOComplete, base::Unretained(this))) {} |
| 64 | 64 |
| 65 SOCKSConnectJob::~SOCKSConnectJob() { | 65 SOCKSConnectJob::~SOCKSConnectJob() { |
| 66 // We don't worry about cancelling the tcp socket since the destructor in | 66 // We don't worry about cancelling the tcp socket since the destructor in |
| 67 // std::unique_ptr<ClientSocketHandle> transport_socket_handle_ will take care | 67 // std::unique_ptr<ClientSocketHandle> transport_socket_handle_ will take care |
| 68 // of | 68 // of |
| (...skipping 233 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 302 base_.RemoveHigherLayeredPool(higher_pool); | 302 base_.RemoveHigherLayeredPool(higher_pool); |
| 303 } | 303 } |
| 304 | 304 |
| 305 bool SOCKSClientSocketPool::CloseOneIdleConnection() { | 305 bool SOCKSClientSocketPool::CloseOneIdleConnection() { |
| 306 if (base_.CloseOneIdleSocket()) | 306 if (base_.CloseOneIdleSocket()) |
| 307 return true; | 307 return true; |
| 308 return base_.CloseOneIdleConnectionInHigherLayeredPool(); | 308 return base_.CloseOneIdleConnectionInHigherLayeredPool(); |
| 309 } | 309 } |
| 310 | 310 |
| 311 } // namespace net | 311 } // namespace net |
| OLD | NEW |