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" |
11 #include "base/time/time.h" | 11 #include "base/time/time.h" |
12 #include "base/values.h" | 12 #include "base/values.h" |
13 #include "net/base/net_errors.h" | 13 #include "net/base/net_errors.h" |
14 #include "net/log/net_log_source_type.h" | 14 #include "net/log/net_log_source_type.h" |
| 15 #include "net/log/net_log_with_source.h" |
15 #include "net/socket/client_socket_factory.h" | 16 #include "net/socket/client_socket_factory.h" |
16 #include "net/socket/client_socket_handle.h" | 17 #include "net/socket/client_socket_handle.h" |
17 #include "net/socket/client_socket_pool_base.h" | 18 #include "net/socket/client_socket_pool_base.h" |
18 #include "net/socket/socks5_client_socket.h" | 19 #include "net/socket/socks5_client_socket.h" |
19 #include "net/socket/socks_client_socket.h" | 20 #include "net/socket/socks_client_socket.h" |
20 #include "net/socket/transport_client_socket_pool.h" | 21 #include "net/socket/transport_client_socket_pool.h" |
21 | 22 |
22 namespace net { | 23 namespace net { |
23 | 24 |
| 25 class NetLog; |
| 26 |
24 SOCKSSocketParams::SOCKSSocketParams( | 27 SOCKSSocketParams::SOCKSSocketParams( |
25 const scoped_refptr<TransportSocketParams>& proxy_server, | 28 const scoped_refptr<TransportSocketParams>& proxy_server, |
26 bool socks_v5, | 29 bool socks_v5, |
27 const HostPortPair& host_port_pair) | 30 const HostPortPair& host_port_pair) |
28 : transport_params_(proxy_server), | 31 : transport_params_(proxy_server), |
29 destination_(host_port_pair), | 32 destination_(host_port_pair), |
30 socks_v5_(socks_v5) { | 33 socks_v5_(socks_v5) { |
31 } | 34 } |
32 | 35 |
33 SOCKSSocketParams::~SOCKSSocketParams() {} | 36 SOCKSSocketParams::~SOCKSSocketParams() {} |
(...skipping 265 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
299 base_.RemoveHigherLayeredPool(higher_pool); | 302 base_.RemoveHigherLayeredPool(higher_pool); |
300 } | 303 } |
301 | 304 |
302 bool SOCKSClientSocketPool::CloseOneIdleConnection() { | 305 bool SOCKSClientSocketPool::CloseOneIdleConnection() { |
303 if (base_.CloseOneIdleSocket()) | 306 if (base_.CloseOneIdleSocket()) |
304 return true; | 307 return true; |
305 return base_.CloseOneIdleConnectionInHigherLayeredPool(); | 308 return base_.CloseOneIdleConnectionInHigherLayeredPool(); |
306 } | 309 } |
307 | 310 |
308 } // namespace net | 311 } // namespace net |
OLD | NEW |