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 #ifndef NET_SOCKET_SSL_CLIENT_SOCKET_POOL_H_ | 5 #ifndef NET_SOCKET_SSL_CLIENT_SOCKET_POOL_H_ |
6 #define NET_SOCKET_SSL_CLIENT_SOCKET_POOL_H_ | 6 #define NET_SOCKET_SSL_CLIENT_SOCKET_POOL_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/memory/ref_counted.h" | 10 #include "base/memory/ref_counted.h" |
11 #include "base/memory/scoped_ptr.h" | 11 #include "base/memory/scoped_ptr.h" |
12 #include "base/time/time.h" | 12 #include "base/time/time.h" |
13 #include "net/base/privacy_mode.h" | 13 #include "net/base/privacy_mode.h" |
14 #include "net/http/http_response_info.h" | 14 #include "net/http/http_response_info.h" |
15 #include "net/socket/client_socket_pool.h" | 15 #include "net/socket/client_socket_pool.h" |
16 #include "net/socket/client_socket_pool_base.h" | 16 #include "net/socket/client_socket_pool_base.h" |
| 17 #include "net/socket/connection_attempts.h" |
17 #include "net/socket/ssl_client_socket.h" | 18 #include "net/socket/ssl_client_socket.h" |
18 #include "net/ssl/ssl_config_service.h" | 19 #include "net/ssl/ssl_config_service.h" |
19 | 20 |
20 namespace net { | 21 namespace net { |
21 | 22 |
22 class CertPolicyEnforcer; | 23 class CertPolicyEnforcer; |
23 class CertVerifier; | 24 class CertVerifier; |
24 class ClientSocketFactory; | 25 class ClientSocketFactory; |
25 class ConnectJobFactory; | 26 class ConnectJobFactory; |
26 class CTVerifier; | 27 class CTVerifier; |
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
158 | 159 |
159 const SSLClientSocketContext context_; | 160 const SSLClientSocketContext context_; |
160 | 161 |
161 State next_state_; | 162 State next_state_; |
162 CompletionCallback callback_; | 163 CompletionCallback callback_; |
163 scoped_ptr<ClientSocketHandle> transport_socket_handle_; | 164 scoped_ptr<ClientSocketHandle> transport_socket_handle_; |
164 scoped_ptr<SSLClientSocket> ssl_socket_; | 165 scoped_ptr<SSLClientSocket> ssl_socket_; |
165 | 166 |
166 HttpResponseInfo error_response_info_; | 167 HttpResponseInfo error_response_info_; |
167 | 168 |
| 169 ConnectionAttempts connection_attempts_; |
| 170 // The address of the server the connect job is connected to. Populated if |
| 171 // and only if the connect job is connected *directly* to the server (not |
| 172 // through an HTTPS CONNECT request or a SOCKS proxy). |
| 173 IPEndPoint server_address_; |
| 174 |
168 DISALLOW_COPY_AND_ASSIGN(SSLConnectJob); | 175 DISALLOW_COPY_AND_ASSIGN(SSLConnectJob); |
169 }; | 176 }; |
170 | 177 |
171 class NET_EXPORT_PRIVATE SSLClientSocketPool | 178 class NET_EXPORT_PRIVATE SSLClientSocketPool |
172 : public ClientSocketPool, | 179 : public ClientSocketPool, |
173 public HigherLayeredPool, | 180 public HigherLayeredPool, |
174 public SSLConfigService::Observer { | 181 public SSLConfigService::Observer { |
175 public: | 182 public: |
176 typedef SSLSocketParams SocketParams; | 183 typedef SSLSocketParams SocketParams; |
177 | 184 |
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
288 HttpProxyClientSocketPool* const http_proxy_pool_; | 295 HttpProxyClientSocketPool* const http_proxy_pool_; |
289 PoolBase base_; | 296 PoolBase base_; |
290 const scoped_refptr<SSLConfigService> ssl_config_service_; | 297 const scoped_refptr<SSLConfigService> ssl_config_service_; |
291 | 298 |
292 DISALLOW_COPY_AND_ASSIGN(SSLClientSocketPool); | 299 DISALLOW_COPY_AND_ASSIGN(SSLClientSocketPool); |
293 }; | 300 }; |
294 | 301 |
295 } // namespace net | 302 } // namespace net |
296 | 303 |
297 #endif // NET_SOCKET_SSL_CLIENT_SOCKET_POOL_H_ | 304 #endif // NET_SOCKET_SSL_CLIENT_SOCKET_POOL_H_ |
OLD | NEW |