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/http/http_proxy_client_socket_pool.h" | 5 #include "net/http/http_proxy_client_socket_pool.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <utility> | 8 #include <utility> |
9 | 9 |
10 #include "base/compiler_specific.h" | 10 #include "base/compiler_specific.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/load_flags.h" | 13 #include "net/base/load_flags.h" |
14 #include "net/base/net_errors.h" | 14 #include "net/base/net_errors.h" |
15 #include "net/base/proxy_delegate.h" | 15 #include "net/base/proxy_delegate.h" |
16 #include "net/http/http_network_session.h" | 16 #include "net/http/http_network_session.h" |
17 #include "net/http/http_proxy_client_socket_wrapper.h" | 17 #include "net/http/http_proxy_client_socket_wrapper.h" |
| 18 #include "net/log/net_log_source_type.h" |
18 #include "net/socket/client_socket_factory.h" | 19 #include "net/socket/client_socket_factory.h" |
19 #include "net/socket/client_socket_handle.h" | 20 #include "net/socket/client_socket_handle.h" |
20 #include "net/socket/client_socket_pool_base.h" | 21 #include "net/socket/client_socket_pool_base.h" |
21 #include "net/socket/ssl_client_socket.h" | 22 #include "net/socket/ssl_client_socket.h" |
22 #include "net/socket/ssl_client_socket_pool.h" | 23 #include "net/socket/ssl_client_socket_pool.h" |
23 #include "net/socket/transport_client_socket_pool.h" | 24 #include "net/socket/transport_client_socket_pool.h" |
24 #include "net/spdy/spdy_proxy_client_socket.h" | 25 #include "net/spdy/spdy_proxy_client_socket.h" |
25 #include "net/spdy/spdy_session.h" | 26 #include "net/spdy/spdy_session.h" |
26 #include "net/spdy/spdy_session_pool.h" | 27 #include "net/spdy/spdy_session_pool.h" |
27 #include "net/spdy/spdy_stream.h" | 28 #include "net/spdy/spdy_stream.h" |
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
81 const base::TimeDelta& timeout_duration, | 82 const base::TimeDelta& timeout_duration, |
82 TransportClientSocketPool* transport_pool, | 83 TransportClientSocketPool* transport_pool, |
83 SSLClientSocketPool* ssl_pool, | 84 SSLClientSocketPool* ssl_pool, |
84 Delegate* delegate, | 85 Delegate* delegate, |
85 NetLog* net_log) | 86 NetLog* net_log) |
86 : ConnectJob(group_name, | 87 : ConnectJob(group_name, |
87 base::TimeDelta() /* The socket takes care of timeouts */, | 88 base::TimeDelta() /* The socket takes care of timeouts */, |
88 priority, | 89 priority, |
89 respect_limits, | 90 respect_limits, |
90 delegate, | 91 delegate, |
91 BoundNetLog::Make(net_log, NetLog::SOURCE_CONNECT_JOB)), | 92 BoundNetLog::Make(net_log, NetLogSourceType::CONNECT_JOB)), |
92 client_socket_(new HttpProxyClientSocketWrapper( | 93 client_socket_(new HttpProxyClientSocketWrapper( |
93 group_name, | 94 group_name, |
94 priority, | 95 priority, |
95 respect_limits, | 96 respect_limits, |
96 timeout_duration, | 97 timeout_duration, |
97 base::TimeDelta::FromSeconds(kHttpProxyConnectJobTimeoutInSeconds), | 98 base::TimeDelta::FromSeconds(kHttpProxyConnectJobTimeoutInSeconds), |
98 transport_pool, | 99 transport_pool, |
99 ssl_pool, | 100 ssl_pool, |
100 params->transport_params(), | 101 params->transport_params(), |
101 params->ssl_params(), | 102 params->ssl_params(), |
(...skipping 208 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
310 base_.RemoveHigherLayeredPool(higher_pool); | 311 base_.RemoveHigherLayeredPool(higher_pool); |
311 } | 312 } |
312 | 313 |
313 bool HttpProxyClientSocketPool::CloseOneIdleConnection() { | 314 bool HttpProxyClientSocketPool::CloseOneIdleConnection() { |
314 if (base_.CloseOneIdleSocket()) | 315 if (base_.CloseOneIdleSocket()) |
315 return true; | 316 return true; |
316 return base_.CloseOneIdleConnectionInHigherLayeredPool(); | 317 return base_.CloseOneIdleConnectionInHigherLayeredPool(); |
317 } | 318 } |
318 | 319 |
319 } // namespace net | 320 } // namespace net |
OLD | NEW |