| 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" |
| (...skipping 13 matching lines...) Expand all Loading... |
| 24 class CertVerifier; | 24 class CertVerifier; |
| 25 class ClientSocketFactory; | 25 class ClientSocketFactory; |
| 26 class ConnectJobFactory; | 26 class ConnectJobFactory; |
| 27 class CTVerifier; | 27 class CTVerifier; |
| 28 class HostPortPair; | 28 class HostPortPair; |
| 29 class HttpProxyClientSocketPool; | 29 class HttpProxyClientSocketPool; |
| 30 class HttpProxySocketParams; | 30 class HttpProxySocketParams; |
| 31 class SOCKSClientSocketPool; | 31 class SOCKSClientSocketPool; |
| 32 class SOCKSSocketParams; | 32 class SOCKSSocketParams; |
| 33 class SSLClientSocket; | 33 class SSLClientSocket; |
| 34 class SSLHostInfoFactory; |
| 34 class TransportClientSocketPool; | 35 class TransportClientSocketPool; |
| 35 class TransportSecurityState; | 36 class TransportSecurityState; |
| 36 class TransportSocketParams; | 37 class TransportSocketParams; |
| 37 | 38 |
| 38 class NET_EXPORT_PRIVATE SSLSocketParams | 39 class NET_EXPORT_PRIVATE SSLSocketParams |
| 39 : public base::RefCounted<SSLSocketParams> { | 40 : public base::RefCounted<SSLSocketParams> { |
| 40 public: | 41 public: |
| 41 enum ConnectionType { DIRECT, SOCKS_PROXY, HTTP_PROXY }; | 42 enum ConnectionType { DIRECT, SOCKS_PROXY, HTTP_PROXY }; |
| 42 | 43 |
| 43 // Exactly one of |direct_params|, |socks_proxy_params|, and | 44 // Exactly one of |direct_params|, |socks_proxy_params|, and |
| (...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 160 HttpProxyClientSocketPool* const http_proxy_pool_; | 161 HttpProxyClientSocketPool* const http_proxy_pool_; |
| 161 ClientSocketFactory* const client_socket_factory_; | 162 ClientSocketFactory* const client_socket_factory_; |
| 162 HostResolver* const host_resolver_; | 163 HostResolver* const host_resolver_; |
| 163 | 164 |
| 164 const SSLClientSocketContext context_; | 165 const SSLClientSocketContext context_; |
| 165 | 166 |
| 166 State next_state_; | 167 State next_state_; |
| 167 CompletionCallback callback_; | 168 CompletionCallback callback_; |
| 168 scoped_ptr<ClientSocketHandle> transport_socket_handle_; | 169 scoped_ptr<ClientSocketHandle> transport_socket_handle_; |
| 169 scoped_ptr<SSLClientSocket> ssl_socket_; | 170 scoped_ptr<SSLClientSocket> ssl_socket_; |
| 171 scoped_ptr<SSLHostInfo> ssl_host_info_; |
| 170 | 172 |
| 171 HttpResponseInfo error_response_info_; | 173 HttpResponseInfo error_response_info_; |
| 172 | 174 |
| 173 DISALLOW_COPY_AND_ASSIGN(SSLConnectJob); | 175 DISALLOW_COPY_AND_ASSIGN(SSLConnectJob); |
| 174 }; | 176 }; |
| 175 | 177 |
| 176 class NET_EXPORT_PRIVATE SSLClientSocketPool | 178 class NET_EXPORT_PRIVATE SSLClientSocketPool |
| 177 : public ClientSocketPool, | 179 : public ClientSocketPool, |
| 178 public HigherLayeredPool, | 180 public HigherLayeredPool, |
| 179 public SSLConfigService::Observer { | 181 public SSLConfigService::Observer { |
| 180 public: | 182 public: |
| 181 typedef SSLSocketParams SocketParams; | 183 typedef SSLSocketParams SocketParams; |
| 182 | 184 |
| 183 // Only the pools that will be used are required. i.e. if you never | 185 // Only the pools that will be used are required. i.e. if you never |
| 184 // try to create an SSL over SOCKS socket, |socks_pool| may be NULL. | 186 // try to create an SSL over SOCKS socket, |socks_pool| may be NULL. |
| 185 SSLClientSocketPool( | 187 SSLClientSocketPool( |
| 186 int max_sockets, | 188 int max_sockets, |
| 187 int max_sockets_per_group, | 189 int max_sockets_per_group, |
| 188 ClientSocketPoolHistograms* histograms, | 190 ClientSocketPoolHistograms* histograms, |
| 189 HostResolver* host_resolver, | 191 HostResolver* host_resolver, |
| 190 CertVerifier* cert_verifier, | 192 CertVerifier* cert_verifier, |
| 191 ServerBoundCertService* server_bound_cert_service, | 193 ServerBoundCertService* server_bound_cert_service, |
| 192 TransportSecurityState* transport_security_state, | 194 TransportSecurityState* transport_security_state, |
| 193 CTVerifier* cert_transparency_verifier, | 195 CTVerifier* cert_transparency_verifier, |
| 196 SSLHostInfoFactory* ssl_host_info_factory, |
| 194 const std::string& ssl_session_cache_shard, | 197 const std::string& ssl_session_cache_shard, |
| 195 ClientSocketFactory* client_socket_factory, | 198 ClientSocketFactory* client_socket_factory, |
| 196 TransportClientSocketPool* transport_pool, | 199 TransportClientSocketPool* transport_pool, |
| 197 SOCKSClientSocketPool* socks_pool, | 200 SOCKSClientSocketPool* socks_pool, |
| 198 HttpProxyClientSocketPool* http_proxy_pool, | 201 HttpProxyClientSocketPool* http_proxy_pool, |
| 199 SSLConfigService* ssl_config_service, | 202 SSLConfigService* ssl_config_service, |
| 200 NetLog* net_log); | 203 NetLog* net_log); |
| 201 | 204 |
| 202 virtual ~SSLClientSocketPool(); | 205 virtual ~SSLClientSocketPool(); |
| 203 | 206 |
| (...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 301 HttpProxyClientSocketPool* const http_proxy_pool_; | 304 HttpProxyClientSocketPool* const http_proxy_pool_; |
| 302 PoolBase base_; | 305 PoolBase base_; |
| 303 const scoped_refptr<SSLConfigService> ssl_config_service_; | 306 const scoped_refptr<SSLConfigService> ssl_config_service_; |
| 304 | 307 |
| 305 DISALLOW_COPY_AND_ASSIGN(SSLClientSocketPool); | 308 DISALLOW_COPY_AND_ASSIGN(SSLClientSocketPool); |
| 306 }; | 309 }; |
| 307 | 310 |
| 308 } // namespace net | 311 } // namespace net |
| 309 | 312 |
| 310 #endif // NET_SOCKET_SSL_CLIENT_SOCKET_POOL_H_ | 313 #endif // NET_SOCKET_SSL_CLIENT_SOCKET_POOL_H_ |
| OLD | NEW |