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 "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/bind_helpers.h" | 8 #include "base/bind_helpers.h" |
9 #include "base/time/time.h" | 9 #include "base/time/time.h" |
10 #include "base/values.h" | 10 #include "base/values.h" |
(...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
165 | 165 |
166 int SOCKSConnectJob::ConnectInternal() { | 166 int SOCKSConnectJob::ConnectInternal() { |
167 next_state_ = STATE_TRANSPORT_CONNECT; | 167 next_state_ = STATE_TRANSPORT_CONNECT; |
168 return DoLoop(OK); | 168 return DoLoop(OK); |
169 } | 169 } |
170 | 170 |
171 scoped_ptr<ConnectJob> | 171 scoped_ptr<ConnectJob> |
172 SOCKSClientSocketPool::SOCKSConnectJobFactory::NewConnectJob( | 172 SOCKSClientSocketPool::SOCKSConnectJobFactory::NewConnectJob( |
173 const std::string& group_name, | 173 const std::string& group_name, |
174 const PoolBase::Request& request, | 174 const PoolBase::Request& request, |
175 ConnectJob::Delegate* delegate) const { | 175 ConnectJob::Delegate* delegate) { |
176 return scoped_ptr<ConnectJob>(new SOCKSConnectJob(group_name, | 176 return scoped_ptr<ConnectJob>(new SOCKSConnectJob(group_name, |
177 request.priority(), | 177 request.priority(), |
178 request.params(), | 178 request.params(), |
179 ConnectionTimeout(), | 179 ConnectionTimeout(), |
180 transport_pool_, | 180 transport_pool_, |
181 host_resolver_, | 181 host_resolver_, |
182 delegate, | 182 delegate, |
183 net_log_)); | 183 net_log_)); |
184 } | 184 } |
185 | 185 |
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
303 base_.RemoveHigherLayeredPool(higher_pool); | 303 base_.RemoveHigherLayeredPool(higher_pool); |
304 } | 304 } |
305 | 305 |
306 bool SOCKSClientSocketPool::CloseOneIdleConnection() { | 306 bool SOCKSClientSocketPool::CloseOneIdleConnection() { |
307 if (base_.CloseOneIdleSocket()) | 307 if (base_.CloseOneIdleSocket()) |
308 return true; | 308 return true; |
309 return base_.CloseOneIdleConnectionInHigherLayeredPool(); | 309 return base_.CloseOneIdleConnectionInHigherLayeredPool(); |
310 } | 310 } |
311 | 311 |
312 } // namespace net | 312 } // namespace net |
OLD | NEW |