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 <memory> | 8 #include <memory> |
9 #include <string> | 9 #include <string> |
10 | 10 |
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
144 | 144 |
145 // Returns the initial state for the state machine based on the | 145 // Returns the initial state for the state machine based on the |
146 // |connection_type|. | 146 // |connection_type|. |
147 static State GetInitialState(SSLSocketParams::ConnectionType connection_type); | 147 static State GetInitialState(SSLSocketParams::ConnectionType connection_type); |
148 | 148 |
149 // Starts the SSL connection process. Returns OK on success and | 149 // Starts the SSL connection process. Returns OK on success and |
150 // ERR_IO_PENDING if it cannot immediately service the request. | 150 // ERR_IO_PENDING if it cannot immediately service the request. |
151 // Otherwise, it returns a net error code. | 151 // Otherwise, it returns a net error code. |
152 int ConnectInternal() override; | 152 int ConnectInternal() override; |
153 | 153 |
| 154 void ResetStateForRetry(); |
| 155 |
154 scoped_refptr<SSLSocketParams> params_; | 156 scoped_refptr<SSLSocketParams> params_; |
155 TransportClientSocketPool* const transport_pool_; | 157 TransportClientSocketPool* const transport_pool_; |
156 SOCKSClientSocketPool* const socks_pool_; | 158 SOCKSClientSocketPool* const socks_pool_; |
157 HttpProxyClientSocketPool* const http_proxy_pool_; | 159 HttpProxyClientSocketPool* const http_proxy_pool_; |
158 ClientSocketFactory* const client_socket_factory_; | 160 ClientSocketFactory* const client_socket_factory_; |
159 | 161 |
160 const SSLClientSocketContext context_; | 162 const SSLClientSocketContext context_; |
161 | 163 |
162 State next_state_; | 164 State next_state_; |
163 CompletionCallback callback_; | 165 CompletionCallback callback_; |
164 std::unique_ptr<ClientSocketHandle> transport_socket_handle_; | 166 std::unique_ptr<ClientSocketHandle> transport_socket_handle_; |
165 std::unique_ptr<SSLClientSocket> ssl_socket_; | 167 std::unique_ptr<SSLClientSocket> ssl_socket_; |
166 | 168 |
167 HttpResponseInfo error_response_info_; | 169 HttpResponseInfo error_response_info_; |
168 | 170 |
169 ConnectionAttempts connection_attempts_; | 171 ConnectionAttempts connection_attempts_; |
170 // The address of the server the connect job is connected to. Populated if | 172 // The address of the server the connect job is connected to. Populated if |
171 // and only if the connect job is connected *directly* to the server (not | 173 // and only if the connect job is connected *directly* to the server (not |
172 // through an HTTPS CONNECT request or a SOCKS proxy). | 174 // through an HTTPS CONNECT request or a SOCKS proxy). |
173 IPEndPoint server_address_; | 175 IPEndPoint server_address_; |
174 | 176 |
| 177 bool version_interference_probe_; |
| 178 |
| 179 // The error which triggered a TLS 1.3 version interference probe, or OK if |
| 180 // none was triggered. |
| 181 int version_interference_error_; |
| 182 |
175 DISALLOW_COPY_AND_ASSIGN(SSLConnectJob); | 183 DISALLOW_COPY_AND_ASSIGN(SSLConnectJob); |
176 }; | 184 }; |
177 | 185 |
178 class NET_EXPORT_PRIVATE SSLClientSocketPool | 186 class NET_EXPORT_PRIVATE SSLClientSocketPool |
179 : public ClientSocketPool, | 187 : public ClientSocketPool, |
180 public HigherLayeredPool, | 188 public HigherLayeredPool, |
181 public SSLConfigService::Observer { | 189 public SSLConfigService::Observer { |
182 public: | 190 public: |
183 typedef SSLSocketParams SocketParams; | 191 typedef SSLSocketParams SocketParams; |
184 | 192 |
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
307 HttpProxyClientSocketPool* const http_proxy_pool_; | 315 HttpProxyClientSocketPool* const http_proxy_pool_; |
308 PoolBase base_; | 316 PoolBase base_; |
309 const scoped_refptr<SSLConfigService> ssl_config_service_; | 317 const scoped_refptr<SSLConfigService> ssl_config_service_; |
310 | 318 |
311 DISALLOW_COPY_AND_ASSIGN(SSLClientSocketPool); | 319 DISALLOW_COPY_AND_ASSIGN(SSLClientSocketPool); |
312 }; | 320 }; |
313 | 321 |
314 } // namespace net | 322 } // namespace net |
315 | 323 |
316 #endif // NET_SOCKET_SSL_CLIENT_SOCKET_POOL_H_ | 324 #endif // NET_SOCKET_SSL_CLIENT_SOCKET_POOL_H_ |
OLD | NEW |