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 <map> | 8 #include <map> |
9 #include <string> | 9 #include <string> |
10 #include <vector> | 10 #include <vector> |
(...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
183 // Note: the SSLConnectJob does not own |messenger| so it must outlive the | 183 // Note: the SSLConnectJob does not own |messenger| so it must outlive the |
184 // job. | 184 // job. |
185 SSLConnectJob(const std::string& group_name, | 185 SSLConnectJob(const std::string& group_name, |
186 RequestPriority priority, | 186 RequestPriority priority, |
187 const scoped_refptr<SSLSocketParams>& params, | 187 const scoped_refptr<SSLSocketParams>& params, |
188 const base::TimeDelta& timeout_duration, | 188 const base::TimeDelta& timeout_duration, |
189 TransportClientSocketPool* transport_pool, | 189 TransportClientSocketPool* transport_pool, |
190 SOCKSClientSocketPool* socks_pool, | 190 SOCKSClientSocketPool* socks_pool, |
191 HttpProxyClientSocketPool* http_proxy_pool, | 191 HttpProxyClientSocketPool* http_proxy_pool, |
192 ClientSocketFactory* client_socket_factory, | 192 ClientSocketFactory* client_socket_factory, |
193 HostResolver* host_resolver, | |
194 const SSLClientSocketContext& context, | 193 const SSLClientSocketContext& context, |
195 const GetMessengerCallback& get_messenger_callback, | 194 const GetMessengerCallback& get_messenger_callback, |
196 Delegate* delegate, | 195 Delegate* delegate, |
197 NetLog* net_log); | 196 NetLog* net_log); |
198 ~SSLConnectJob() override; | 197 ~SSLConnectJob() override; |
199 | 198 |
200 // ConnectJob methods. | 199 // ConnectJob methods. |
201 LoadState GetLoadState() const override; | 200 LoadState GetLoadState() const override; |
202 | 201 |
203 void GetAdditionalErrorState(ClientSocketHandle* handle) override; | 202 void GetAdditionalErrorState(ClientSocketHandle* handle) override; |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
243 // Starts the SSL connection process. Returns OK on success and | 242 // Starts the SSL connection process. Returns OK on success and |
244 // ERR_IO_PENDING if it cannot immediately service the request. | 243 // ERR_IO_PENDING if it cannot immediately service the request. |
245 // Otherwise, it returns a net error code. | 244 // Otherwise, it returns a net error code. |
246 int ConnectInternal() override; | 245 int ConnectInternal() override; |
247 | 246 |
248 scoped_refptr<SSLSocketParams> params_; | 247 scoped_refptr<SSLSocketParams> params_; |
249 TransportClientSocketPool* const transport_pool_; | 248 TransportClientSocketPool* const transport_pool_; |
250 SOCKSClientSocketPool* const socks_pool_; | 249 SOCKSClientSocketPool* const socks_pool_; |
251 HttpProxyClientSocketPool* const http_proxy_pool_; | 250 HttpProxyClientSocketPool* const http_proxy_pool_; |
252 ClientSocketFactory* const client_socket_factory_; | 251 ClientSocketFactory* const client_socket_factory_; |
253 HostResolver* const host_resolver_; | |
254 | 252 |
255 const SSLClientSocketContext context_; | 253 const SSLClientSocketContext context_; |
256 | 254 |
257 State next_state_; | 255 State next_state_; |
258 CompletionCallback io_callback_; | 256 CompletionCallback io_callback_; |
259 scoped_ptr<ClientSocketHandle> transport_socket_handle_; | 257 scoped_ptr<ClientSocketHandle> transport_socket_handle_; |
260 scoped_ptr<SSLClientSocket> ssl_socket_; | 258 scoped_ptr<SSLClientSocket> ssl_socket_; |
261 | 259 |
262 SSLConnectJobMessenger* messenger_; | 260 SSLConnectJobMessenger* messenger_; |
263 HttpResponseInfo error_response_info_; | 261 HttpResponseInfo error_response_info_; |
(...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
408 const scoped_refptr<SSLConfigService> ssl_config_service_; | 406 const scoped_refptr<SSLConfigService> ssl_config_service_; |
409 MessengerMap messenger_map_; | 407 MessengerMap messenger_map_; |
410 bool enable_ssl_connect_job_waiting_; | 408 bool enable_ssl_connect_job_waiting_; |
411 | 409 |
412 DISALLOW_COPY_AND_ASSIGN(SSLClientSocketPool); | 410 DISALLOW_COPY_AND_ASSIGN(SSLClientSocketPool); |
413 }; | 411 }; |
414 | 412 |
415 } // namespace net | 413 } // namespace net |
416 | 414 |
417 #endif // NET_SOCKET_SSL_CLIENT_SOCKET_POOL_H_ | 415 #endif // NET_SOCKET_SSL_CLIENT_SOCKET_POOL_H_ |
OLD | NEW |