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.h" | 9 #include "base/time.h" |
10 #include "base/values.h" | 10 #include "base/values.h" |
(...skipping 224 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
235 void SOCKSClientSocketPool::CancelRequest(const std::string& group_name, | 235 void SOCKSClientSocketPool::CancelRequest(const std::string& group_name, |
236 ClientSocketHandle* handle) { | 236 ClientSocketHandle* handle) { |
237 base_.CancelRequest(group_name, handle); | 237 base_.CancelRequest(group_name, handle); |
238 } | 238 } |
239 | 239 |
240 void SOCKSClientSocketPool::ReleaseSocket(const std::string& group_name, | 240 void SOCKSClientSocketPool::ReleaseSocket(const std::string& group_name, |
241 StreamSocket* socket, int id) { | 241 StreamSocket* socket, int id) { |
242 base_.ReleaseSocket(group_name, socket, id); | 242 base_.ReleaseSocket(group_name, socket, id); |
243 } | 243 } |
244 | 244 |
245 void SOCKSClientSocketPool::Flush() { | 245 void SOCKSClientSocketPool::FlushWithError(int error) { |
246 base_.Flush(); | 246 base_.FlushWithError(error); |
247 } | 247 } |
248 | 248 |
249 bool SOCKSClientSocketPool::IsStalled() const { | 249 bool SOCKSClientSocketPool::IsStalled() const { |
250 return base_.IsStalled() || transport_pool_->IsStalled(); | 250 return base_.IsStalled() || transport_pool_->IsStalled(); |
251 } | 251 } |
252 | 252 |
253 void SOCKSClientSocketPool::CloseIdleSockets() { | 253 void SOCKSClientSocketPool::CloseIdleSockets() { |
254 base_.CloseIdleSockets(); | 254 base_.CloseIdleSockets(); |
255 } | 255 } |
256 | 256 |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
299 return base_.histograms(); | 299 return base_.histograms(); |
300 }; | 300 }; |
301 | 301 |
302 bool SOCKSClientSocketPool::CloseOneIdleConnection() { | 302 bool SOCKSClientSocketPool::CloseOneIdleConnection() { |
303 if (base_.CloseOneIdleSocket()) | 303 if (base_.CloseOneIdleSocket()) |
304 return true; | 304 return true; |
305 return base_.CloseOneIdleConnectionInLayeredPool(); | 305 return base_.CloseOneIdleConnectionInLayeredPool(); |
306 } | 306 } |
307 | 307 |
308 } // namespace net | 308 } // namespace net |
OLD | NEW |