| OLD | NEW | 
|---|
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 #pragma once | 7 #pragma once | 
| 8 | 8 | 
| 9 #include <string> | 9 #include <string> | 
| 10 | 10 | 
| 11 #include "base/ref_counted.h" | 11 #include "base/ref_counted.h" | 
| 12 #include "base/scoped_ptr.h" | 12 #include "base/scoped_ptr.h" | 
| 13 #include "base/time.h" | 13 #include "base/time.h" | 
| 14 #include "net/base/host_resolver.h" | 14 #include "net/base/host_resolver.h" | 
| 15 #include "net/base/ssl_config_service.h" | 15 #include "net/base/ssl_config_service.h" | 
| 16 #include "net/http/http_response_info.h" | 16 #include "net/http/http_response_info.h" | 
| 17 #include "net/proxy/proxy_server.h" | 17 #include "net/proxy/proxy_server.h" | 
| 18 #include "net/socket/ssl_client_socket.h" | 18 #include "net/socket/ssl_client_socket.h" | 
| 19 #include "net/socket/client_socket_pool_base.h" | 19 #include "net/socket/client_socket_pool_base.h" | 
| 20 #include "net/socket/client_socket_pool_histograms.h" | 20 #include "net/socket/client_socket_pool_histograms.h" | 
| 21 #include "net/socket/client_socket_pool.h" | 21 #include "net/socket/client_socket_pool.h" | 
| 22 | 22 | 
| 23 namespace net { | 23 namespace net { | 
| 24 | 24 | 
| 25 class ClientSocketFactory; | 25 class ClientSocketFactory; | 
| 26 class ConnectJobFactory; | 26 class ConnectJobFactory; | 
| 27 class DnsRRResolver; | 27 class DnsRRResolver; | 
|  | 28 class HostPortPair; | 
| 28 class HttpProxyClientSocketPool; | 29 class HttpProxyClientSocketPool; | 
| 29 class HttpProxySocketParams; | 30 class HttpProxySocketParams; | 
| 30 class SOCKSClientSocketPool; | 31 class SOCKSClientSocketPool; | 
| 31 class SOCKSSocketParams; | 32 class SOCKSSocketParams; | 
| 32 class SSLClientSocket; | 33 class SSLClientSocket; | 
| 33 class SSLHostInfoFactory; | 34 class SSLHostInfoFactory; | 
| 34 class TCPClientSocketPool; | 35 class TCPClientSocketPool; | 
| 35 class TCPSocketParams; | 36 class TCPSocketParams; | 
| 36 struct RRResponse; | 37 struct RRResponse; | 
| 37 | 38 | 
| 38 // SSLSocketParams only needs the socket params for the transport socket | 39 // SSLSocketParams only needs the socket params for the transport socket | 
| 39 // that will be used (denoted by |proxy|). | 40 // that will be used (denoted by |proxy|). | 
| 40 class SSLSocketParams : public base::RefCounted<SSLSocketParams> { | 41 class SSLSocketParams : public base::RefCounted<SSLSocketParams> { | 
| 41  public: | 42  public: | 
| 42   SSLSocketParams(const scoped_refptr<TCPSocketParams>& tcp_params, | 43   SSLSocketParams(const scoped_refptr<TCPSocketParams>& tcp_params, | 
| 43                   const scoped_refptr<SOCKSSocketParams>& socks_params, | 44                   const scoped_refptr<SOCKSSocketParams>& socks_params, | 
| 44                   const scoped_refptr<HttpProxySocketParams>& http_proxy_params, | 45                   const scoped_refptr<HttpProxySocketParams>& http_proxy_params, | 
| 45                   ProxyServer::Scheme proxy, | 46                   ProxyServer::Scheme proxy, | 
| 46                   const std::string& hostname, | 47                   const HostPortPair& host_and_port, | 
| 47                   const SSLConfig& ssl_config, | 48                   const SSLConfig& ssl_config, | 
| 48                   int load_flags, | 49                   int load_flags, | 
| 49                   bool force_spdy_over_ssl, | 50                   bool force_spdy_over_ssl, | 
| 50                   bool want_spdy_over_npn); | 51                   bool want_spdy_over_npn); | 
| 51 | 52 | 
| 52   const scoped_refptr<TCPSocketParams>& tcp_params() { return tcp_params_; } | 53   const scoped_refptr<TCPSocketParams>& tcp_params() { return tcp_params_; } | 
| 53   const scoped_refptr<HttpProxySocketParams>& http_proxy_params() { | 54   const scoped_refptr<HttpProxySocketParams>& http_proxy_params() { | 
| 54     return http_proxy_params_; | 55     return http_proxy_params_; | 
| 55   } | 56   } | 
| 56   const scoped_refptr<SOCKSSocketParams>& socks_params() { | 57   const scoped_refptr<SOCKSSocketParams>& socks_params() { | 
| 57     return socks_params_; | 58     return socks_params_; | 
| 58   } | 59   } | 
| 59   ProxyServer::Scheme proxy() const { return proxy_; } | 60   ProxyServer::Scheme proxy() const { return proxy_; } | 
| 60   const std::string& hostname() const { return hostname_; } | 61   const HostPortPair& host_and_port() const { return host_and_port_; } | 
| 61   const SSLConfig& ssl_config() const { return ssl_config_; } | 62   const SSLConfig& ssl_config() const { return ssl_config_; } | 
| 62   int load_flags() const { return load_flags_; } | 63   int load_flags() const { return load_flags_; } | 
| 63   bool force_spdy_over_ssl() const { return force_spdy_over_ssl_; } | 64   bool force_spdy_over_ssl() const { return force_spdy_over_ssl_; } | 
| 64   bool want_spdy_over_npn() const { return want_spdy_over_npn_; } | 65   bool want_spdy_over_npn() const { return want_spdy_over_npn_; } | 
| 65 | 66 | 
| 66  private: | 67  private: | 
| 67   friend class base::RefCounted<SSLSocketParams>; | 68   friend class base::RefCounted<SSLSocketParams>; | 
| 68   ~SSLSocketParams(); | 69   ~SSLSocketParams(); | 
| 69 | 70 | 
| 70   const scoped_refptr<TCPSocketParams> tcp_params_; | 71   const scoped_refptr<TCPSocketParams> tcp_params_; | 
| 71   const scoped_refptr<HttpProxySocketParams> http_proxy_params_; | 72   const scoped_refptr<HttpProxySocketParams> http_proxy_params_; | 
| 72   const scoped_refptr<SOCKSSocketParams> socks_params_; | 73   const scoped_refptr<SOCKSSocketParams> socks_params_; | 
| 73   const ProxyServer::Scheme proxy_; | 74   const ProxyServer::Scheme proxy_; | 
| 74   const std::string hostname_; | 75   const HostPortPair host_and_port_; | 
| 75   const SSLConfig ssl_config_; | 76   const SSLConfig ssl_config_; | 
| 76   const int load_flags_; | 77   const int load_flags_; | 
| 77   const bool force_spdy_over_ssl_; | 78   const bool force_spdy_over_ssl_; | 
| 78   const bool want_spdy_over_npn_; | 79   const bool want_spdy_over_npn_; | 
| 79 | 80 | 
| 80   DISALLOW_COPY_AND_ASSIGN(SSLSocketParams); | 81   DISALLOW_COPY_AND_ASSIGN(SSLSocketParams); | 
| 81 }; | 82 }; | 
| 82 | 83 | 
| 83 // SSLConnectJob handles the SSL handshake after setting up the underlying | 84 // SSLConnectJob handles the SSL handshake after setting up the underlying | 
| 84 // connection as specified in the params. | 85 // connection as specified in the params. | 
| (...skipping 192 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 277   const scoped_refptr<SSLConfigService> ssl_config_service_; | 278   const scoped_refptr<SSLConfigService> ssl_config_service_; | 
| 278 | 279 | 
| 279   DISALLOW_COPY_AND_ASSIGN(SSLClientSocketPool); | 280   DISALLOW_COPY_AND_ASSIGN(SSLClientSocketPool); | 
| 280 }; | 281 }; | 
| 281 | 282 | 
| 282 REGISTER_SOCKET_PARAMS_FOR_POOL(SSLClientSocketPool, SSLSocketParams); | 283 REGISTER_SOCKET_PARAMS_FOR_POOL(SSLClientSocketPool, SSLSocketParams); | 
| 283 | 284 | 
| 284 }  // namespace net | 285 }  // namespace net | 
| 285 | 286 | 
| 286 #endif  // NET_SOCKET_SSL_CLIENT_SOCKET_POOL_H_ | 287 #endif  // NET_SOCKET_SSL_CLIENT_SOCKET_POOL_H_ | 
| OLD | NEW | 
|---|