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 134 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
161 | 162 |
162 const SSLClientSocketContext context_; | 163 const SSLClientSocketContext context_; |
163 | 164 |
164 State next_state_; | 165 State next_state_; |
165 CompletionCallback callback_; | 166 CompletionCallback callback_; |
166 scoped_ptr<ClientSocketHandle> transport_socket_handle_; | 167 scoped_ptr<ClientSocketHandle> transport_socket_handle_; |
167 scoped_ptr<SSLClientSocket> ssl_socket_; | 168 scoped_ptr<SSLClientSocket> ssl_socket_; |
168 | 169 |
169 HttpResponseInfo error_response_info_; | 170 HttpResponseInfo error_response_info_; |
170 | 171 |
| 172 ConnectionAttempts connection_attempts_; |
| 173 // The address of the server the connect job is connected to. Populated if |
| 174 // and only if the connect job is connected *directly* to the server (not |
| 175 // through an HTTPS CONNECT request or a SOCKS proxy). |
| 176 IPEndPoint server_address_; |
| 177 |
171 DISALLOW_COPY_AND_ASSIGN(SSLConnectJob); | 178 DISALLOW_COPY_AND_ASSIGN(SSLConnectJob); |
172 }; | 179 }; |
173 | 180 |
174 class NET_EXPORT_PRIVATE SSLClientSocketPool | 181 class NET_EXPORT_PRIVATE SSLClientSocketPool |
175 : public ClientSocketPool, | 182 : public ClientSocketPool, |
176 public HigherLayeredPool, | 183 public HigherLayeredPool, |
177 public SSLConfigService::Observer { | 184 public SSLConfigService::Observer { |
178 public: | 185 public: |
179 typedef SSLSocketParams SocketParams; | 186 typedef SSLSocketParams SocketParams; |
180 | 187 |
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
291 HttpProxyClientSocketPool* const http_proxy_pool_; | 298 HttpProxyClientSocketPool* const http_proxy_pool_; |
292 PoolBase base_; | 299 PoolBase base_; |
293 const scoped_refptr<SSLConfigService> ssl_config_service_; | 300 const scoped_refptr<SSLConfigService> ssl_config_service_; |
294 | 301 |
295 DISALLOW_COPY_AND_ASSIGN(SSLClientSocketPool); | 302 DISALLOW_COPY_AND_ASSIGN(SSLClientSocketPool); |
296 }; | 303 }; |
297 | 304 |
298 } // namespace net | 305 } // namespace net |
299 | 306 |
300 #endif // NET_SOCKET_SSL_CLIENT_SOCKET_POOL_H_ | 307 #endif // NET_SOCKET_SSL_CLIENT_SOCKET_POOL_H_ |
OLD | NEW |