| 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 218 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 229 void SOCKSClientSocketPool::RequestSockets(const std::string& group_name, | 229 void SOCKSClientSocketPool::RequestSockets(const std::string& group_name, |
| 230 const void* params, | 230 const void* params, |
| 231 int num_sockets, | 231 int num_sockets, |
| 232 const NetLogWithSource& net_log) { | 232 const NetLogWithSource& net_log) { |
| 233 const scoped_refptr<SOCKSSocketParams>* casted_params = | 233 const scoped_refptr<SOCKSSocketParams>* casted_params = |
| 234 static_cast<const scoped_refptr<SOCKSSocketParams>*>(params); | 234 static_cast<const scoped_refptr<SOCKSSocketParams>*>(params); |
| 235 | 235 |
| 236 base_.RequestSockets(group_name, *casted_params, num_sockets, net_log); | 236 base_.RequestSockets(group_name, *casted_params, num_sockets, net_log); |
| 237 } | 237 } |
| 238 | 238 |
| 239 void SOCKSClientSocketPool::SetPriority(const std::string& group_name, |
| 240 ClientSocketHandle* handle, |
| 241 RequestPriority priority) { |
| 242 base_.SetPriority(group_name, handle, priority); |
| 243 } |
| 244 |
| 239 void SOCKSClientSocketPool::CancelRequest(const std::string& group_name, | 245 void SOCKSClientSocketPool::CancelRequest(const std::string& group_name, |
| 240 ClientSocketHandle* handle) { | 246 ClientSocketHandle* handle) { |
| 241 base_.CancelRequest(group_name, handle); | 247 base_.CancelRequest(group_name, handle); |
| 242 } | 248 } |
| 243 | 249 |
| 244 void SOCKSClientSocketPool::ReleaseSocket(const std::string& group_name, | 250 void SOCKSClientSocketPool::ReleaseSocket(const std::string& group_name, |
| 245 std::unique_ptr<StreamSocket> socket, | 251 std::unique_ptr<StreamSocket> socket, |
| 246 int id) { | 252 int id) { |
| 247 base_.ReleaseSocket(group_name, std::move(socket), id); | 253 base_.ReleaseSocket(group_name, std::move(socket), id); |
| 248 } | 254 } |
| (...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 302 base_.RemoveHigherLayeredPool(higher_pool); | 308 base_.RemoveHigherLayeredPool(higher_pool); |
| 303 } | 309 } |
| 304 | 310 |
| 305 bool SOCKSClientSocketPool::CloseOneIdleConnection() { | 311 bool SOCKSClientSocketPool::CloseOneIdleConnection() { |
| 306 if (base_.CloseOneIdleSocket()) | 312 if (base_.CloseOneIdleSocket()) |
| 307 return true; | 313 return true; |
| 308 return base_.CloseOneIdleConnectionInHigherLayeredPool(); | 314 return base_.CloseOneIdleConnectionInHigherLayeredPool(); |
| 309 } | 315 } |
| 310 | 316 |
| 311 } // namespace net | 317 } // namespace net |
| OLD | NEW |