| 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 const scoped_refptr<HttpProxySocketParams>& http_proxy_params, | 37 const scoped_refptr<HttpProxySocketParams>& http_proxy_params, |
| 38 const scoped_refptr<SOCKSSocketParams>& socks_params, | 38 const scoped_refptr<SOCKSSocketParams>& socks_params, |
| 39 ProxyServer::Scheme proxy, | 39 ProxyServer::Scheme proxy, |
| 40 const std::string& hostname, | 40 const std::string& hostname, |
| 41 const SSLConfig& ssl_config, | 41 const SSLConfig& ssl_config, |
| 42 int load_flags, | 42 int load_flags, |
| 43 bool force_spdy_over_ssl, | 43 bool force_spdy_over_ssl, |
| 44 bool want_spdy_over_npn); | 44 bool want_spdy_over_npn); |
| 45 | 45 |
| 46 const scoped_refptr<TCPSocketParams>& tcp_params() { return tcp_params_; } | 46 const scoped_refptr<TCPSocketParams>& tcp_params() { return tcp_params_; } |
| 47 const scoped_refptr<HttpProxySocketParams>& http_proxy_params () { | 47 const scoped_refptr<HttpProxySocketParams>& http_proxy_params() { |
| 48 return http_proxy_params_; | 48 return http_proxy_params_; |
| 49 } | 49 } |
| 50 const scoped_refptr<SOCKSSocketParams>& socks_params() { | 50 const scoped_refptr<SOCKSSocketParams>& socks_params() { |
| 51 return socks_params_; | 51 return socks_params_; |
| 52 } | 52 } |
| 53 ProxyServer::Scheme proxy() const { return proxy_; } | 53 ProxyServer::Scheme proxy() const { return proxy_; } |
| 54 const std::string& hostname() const { return hostname_; } | 54 const std::string& hostname() const { return hostname_; } |
| 55 const SSLConfig& ssl_config() const { return ssl_config_; } | 55 const SSLConfig& ssl_config() const { return ssl_config_; } |
| 56 int load_flags() const { return load_flags_; } | 56 int load_flags() const { return load_flags_; } |
| 57 bool force_spdy_over_ssl() const { return force_spdy_over_ssl_; } | 57 bool force_spdy_over_ssl() const { return force_spdy_over_ssl_; } |
| (...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 107 STATE_SSL_CONNECT, | 107 STATE_SSL_CONNECT, |
| 108 STATE_SSL_CONNECT_COMPLETE, | 108 STATE_SSL_CONNECT_COMPLETE, |
| 109 STATE_NONE, | 109 STATE_NONE, |
| 110 }; | 110 }; |
| 111 | 111 |
| 112 // Starts the SSL connection process. Returns OK on success and | 112 // Starts the SSL connection process. Returns OK on success and |
| 113 // ERR_IO_PENDING if it cannot immediately service the request. | 113 // ERR_IO_PENDING if it cannot immediately service the request. |
| 114 // Otherwise, it returns a net error code. | 114 // Otherwise, it returns a net error code. |
| 115 virtual int ConnectInternal(); | 115 virtual int ConnectInternal(); |
| 116 | 116 |
| 117 void DetermineFirstState(); | |
| 118 | |
| 119 void OnIOComplete(int result); | 117 void OnIOComplete(int result); |
| 120 | 118 |
| 121 // Runs the state transition loop. | 119 // Runs the state transition loop. |
| 122 int DoLoop(int result); | 120 int DoLoop(int result); |
| 123 | 121 |
| 124 int DoTCPConnect(); | 122 int DoTCPConnect(); |
| 125 int DoTCPConnectComplete(int result); | 123 int DoTCPConnectComplete(int result); |
| 126 int DoSOCKSConnect(); | 124 int DoSOCKSConnect(); |
| 127 int DoSOCKSConnectComplete(int result); | 125 int DoSOCKSConnectComplete(int result); |
| 128 int DoTunnelConnect(); | 126 int DoTunnelConnect(); |
| (...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 242 PoolBase base_; | 240 PoolBase base_; |
| 243 | 241 |
| 244 DISALLOW_COPY_AND_ASSIGN(SSLClientSocketPool); | 242 DISALLOW_COPY_AND_ASSIGN(SSLClientSocketPool); |
| 245 }; | 243 }; |
| 246 | 244 |
| 247 REGISTER_SOCKET_PARAMS_FOR_POOL(SSLClientSocketPool, SSLSocketParams); | 245 REGISTER_SOCKET_PARAMS_FOR_POOL(SSLClientSocketPool, SSLSocketParams); |
| 248 | 246 |
| 249 } // namespace net | 247 } // namespace net |
| 250 | 248 |
| 251 #endif // NET_SOCKET_SSL_CLIENT_SOCKET_POOL_H_ | 249 #endif // NET_SOCKET_SSL_CLIENT_SOCKET_POOL_H_ |
| OLD | NEW |