Chromium Code Reviews| Index: net/socket/ssl_client_socket_pool.cc |
| diff --git a/net/socket/ssl_client_socket_pool.cc b/net/socket/ssl_client_socket_pool.cc |
| index de315fdc01a51eb00353ea92a3473aa5240e6f9e..ab885154f2130253bcd944bd70c5d5386b244d57 100644 |
| --- a/net/socket/ssl_client_socket_pool.cc |
| +++ b/net/socket/ssl_client_socket_pool.cc |
| @@ -18,6 +18,7 @@ |
| #include "net/socket/client_socket_handle.h" |
| #include "net/socket/socks_client_socket_pool.h" |
| #include "net/socket/ssl_client_socket.h" |
| +#include "net/socket/ssl_host_info.h" |
| #include "net/socket/transport_client_socket_pool.h" |
| #include "net/ssl/ssl_cert_request_info.h" |
| #include "net/ssl/ssl_connection_status_flags.h" |
| @@ -124,6 +125,7 @@ SSLConnectJob::SSLConnectJob(const std::string& group_name, |
| context.server_bound_cert_service, |
| context.transport_security_state, |
| context.cert_transparency_verifier, |
| + NULL, /* TODO(rtenneti): Fix SSLHostInfoFactory */ |
|
wtc
2014/01/15 19:08:59
I think a ssl_host_info_factory member should be a
ramant (doing other things)
2014/01/18 00:21:56
It is already in https://codereview.chromium.org/1
ramant (doing other things)
2014/01/18 00:28:47
Passed context.ssl_host_info_factory and removed
|
| (params->privacy_mode() == kPrivacyModeEnabled |
| ? "pm/" + context.ssl_session_cache_shard |
| : context.ssl_session_cache_shard)), |
| @@ -220,6 +222,19 @@ int SSLConnectJob::DoLoop(int result) { |
| int SSLConnectJob::DoTransportConnect() { |
| DCHECK(transport_pool_); |
| + if (context_.ssl_host_info_factory) { |
| + ssl_host_info_.reset( |
| + context_.ssl_host_info_factory->GetForHost( |
| + params_->host_and_port().host(), |
| + params_->ssl_config())); |
| + } |
| + |
| + if (ssl_host_info_.get()) { |
| + // This starts fetching the SSL host info from the disk cache for early |
| + // certificate verification and the TLS cached information extension. |
| + ssl_host_info_->Start(); |
| + } |
| + |
| next_state_ = STATE_TRANSPORT_CONNECT_COMPLETE; |
| transport_socket_handle_.reset(new ClientSocketHandle()); |
| scoped_refptr<TransportSocketParams> direct_params = |
| @@ -320,6 +335,7 @@ int SSLConnectJob::DoSSLConnect() { |
| transport_socket_handle_.Pass(), |
| params_->host_and_port(), |
| params_->ssl_config(), |
| + ssl_host_info_.release(), |
| context_); |
| return ssl_socket_->Connect(callback_); |
| } |
| @@ -510,6 +526,7 @@ SSLClientSocketPool::SSLClientSocketPool( |
| ServerBoundCertService* server_bound_cert_service, |
| TransportSecurityState* transport_security_state, |
| CTVerifier* cert_transparency_verifier, |
| + SSLHostInfoFactory* ssl_host_info_factory, |
| const std::string& ssl_session_cache_shard, |
| ClientSocketFactory* client_socket_factory, |
| TransportClientSocketPool* transport_pool, |
| @@ -533,6 +550,7 @@ SSLClientSocketPool::SSLClientSocketPool( |
| server_bound_cert_service, |
| transport_security_state, |
| cert_transparency_verifier, |
| + ssl_host_info_factory, |
| ssl_session_cache_shard), |
| net_log)), |
| ssl_config_service_(ssl_config_service) { |