| 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 |
| (...skipping 26 matching lines...) Expand all Loading... |
| 37 | 37 |
| 38 // SSLSocketParams only needs the socket params for the transport socket | 38 // SSLSocketParams only needs the socket params for the transport socket |
| 39 // that will be used (denoted by |proxy|). | 39 // that will be used (denoted by |proxy|). |
| 40 class SSLSocketParams : public base::RefCounted<SSLSocketParams> { | 40 class SSLSocketParams : public base::RefCounted<SSLSocketParams> { |
| 41 public: | 41 public: |
| 42 SSLSocketParams(const scoped_refptr<TCPSocketParams>& tcp_params, | 42 SSLSocketParams(const scoped_refptr<TCPSocketParams>& tcp_params, |
| 43 const scoped_refptr<SOCKSSocketParams>& socks_params, | 43 const scoped_refptr<SOCKSSocketParams>& socks_params, |
| 44 const scoped_refptr<HttpProxySocketParams>& http_proxy_params, | 44 const scoped_refptr<HttpProxySocketParams>& http_proxy_params, |
| 45 ProxyServer::Scheme proxy, | 45 ProxyServer::Scheme proxy, |
| 46 const std::string& hostname, | 46 const std::string& hostname, |
| 47 uint16 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 std::string& hostname() const { return hostname_; } |
| 62 uint16 port() const { return port_; } |
| 61 const SSLConfig& ssl_config() const { return ssl_config_; } | 63 const SSLConfig& ssl_config() const { return ssl_config_; } |
| 62 int load_flags() const { return load_flags_; } | 64 int load_flags() const { return load_flags_; } |
| 63 bool force_spdy_over_ssl() const { return force_spdy_over_ssl_; } | 65 bool force_spdy_over_ssl() const { return force_spdy_over_ssl_; } |
| 64 bool want_spdy_over_npn() const { return want_spdy_over_npn_; } | 66 bool want_spdy_over_npn() const { return want_spdy_over_npn_; } |
| 65 | 67 |
| 66 private: | 68 private: |
| 67 friend class base::RefCounted<SSLSocketParams>; | 69 friend class base::RefCounted<SSLSocketParams>; |
| 68 ~SSLSocketParams(); | 70 ~SSLSocketParams(); |
| 69 | 71 |
| 70 const scoped_refptr<TCPSocketParams> tcp_params_; | 72 const scoped_refptr<TCPSocketParams> tcp_params_; |
| 71 const scoped_refptr<HttpProxySocketParams> http_proxy_params_; | 73 const scoped_refptr<HttpProxySocketParams> http_proxy_params_; |
| 72 const scoped_refptr<SOCKSSocketParams> socks_params_; | 74 const scoped_refptr<SOCKSSocketParams> socks_params_; |
| 73 const ProxyServer::Scheme proxy_; | 75 const ProxyServer::Scheme proxy_; |
| 74 const std::string hostname_; | 76 const std::string hostname_; |
| 77 uint16 port_; |
| 75 const SSLConfig ssl_config_; | 78 const SSLConfig ssl_config_; |
| 76 const int load_flags_; | 79 const int load_flags_; |
| 77 const bool force_spdy_over_ssl_; | 80 const bool force_spdy_over_ssl_; |
| 78 const bool want_spdy_over_npn_; | 81 const bool want_spdy_over_npn_; |
| 79 | 82 |
| 80 DISALLOW_COPY_AND_ASSIGN(SSLSocketParams); | 83 DISALLOW_COPY_AND_ASSIGN(SSLSocketParams); |
| 81 }; | 84 }; |
| 82 | 85 |
| 83 // SSLConnectJob handles the SSL handshake after setting up the underlying | 86 // SSLConnectJob handles the SSL handshake after setting up the underlying |
| 84 // connection as specified in the params. | 87 // 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_; | 280 const scoped_refptr<SSLConfigService> ssl_config_service_; |
| 278 | 281 |
| 279 DISALLOW_COPY_AND_ASSIGN(SSLClientSocketPool); | 282 DISALLOW_COPY_AND_ASSIGN(SSLClientSocketPool); |
| 280 }; | 283 }; |
| 281 | 284 |
| 282 REGISTER_SOCKET_PARAMS_FOR_POOL(SSLClientSocketPool, SSLSocketParams); | 285 REGISTER_SOCKET_PARAMS_FOR_POOL(SSLClientSocketPool, SSLSocketParams); |
| 283 | 286 |
| 284 } // namespace net | 287 } // namespace net |
| 285 | 288 |
| 286 #endif // NET_SOCKET_SSL_CLIENT_SOCKET_POOL_H_ | 289 #endif // NET_SOCKET_SSL_CLIENT_SOCKET_POOL_H_ |
| OLD | NEW |