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 6643ef4e3af0ac5e00c9c0b27f31b37e278abd1d..71da20ee501ef7fa259fa810357cf813fdf1c034 100644 |
| --- a/net/socket/ssl_client_socket_pool.cc |
| +++ b/net/socket/ssl_client_socket_pool.cc |
| @@ -244,6 +244,8 @@ void SSLConnectJob::GetAdditionalErrorState(ClientSocketHandle* handle) { |
| handle->set_ssl_error_response_info(error_response_info_); |
| if (!connect_timing_.ssl_start.is_null()) |
| handle->set_is_ssl_error(true); |
| + |
| + handle->set_connection_attempts(connection_attempts_); |
| } |
| void SSLConnectJob::OnIOComplete(int result) { |
| @@ -320,8 +322,11 @@ int SSLConnectJob::DoTransportConnect() { |
| } |
| int SSLConnectJob::DoTransportConnectComplete(int result) { |
| - if (result == OK) |
| + connection_attempts_ = transport_socket_handle_->connection_attempts(); |
| + if (result == OK) { |
| next_state_ = STATE_CREATE_SSL_SOCKET; |
| + transport_socket_handle_->socket()->GetPeerAddress(&direct_address_); |
| + } |
| return result; |
| } |
| @@ -451,6 +456,12 @@ int SSLConnectJob::DoSSLConnect() { |
| int SSLConnectJob::DoSSLConnectComplete(int result) { |
| connect_timing_.ssl_end = base::TimeTicks::Now(); |
| + if (result != OK && !direct_address_.address().empty()) { |
| + connection_attempts_.push_back( |
| + ClientSocketHandle::ConnectionAttempt(direct_address_, result)); |
| + direct_address_ = IPEndPoint(); |
|
Ryan Hamilton
2015/03/17 03:22:28
If this is the only place this member is used, it
Deprecated (see juliatuttle)
2015/03/23 17:45:35
I'm resetting it just to be careful, and yeah, I t
|
| + } |
| + |
| SSLClientSocket::NextProtoStatus status = |
| SSLClientSocket::kNextProtoUnsupported; |
| std::string proto; |