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 e6c770c6d8bc9f6afbd6a9ecad2dd8c8049c33e8..3e8d0a210214f5faa2e2feba9eff42876fb44bbe 100644 |
--- a/net/socket/ssl_client_socket_pool.cc |
+++ b/net/socket/ssl_client_socket_pool.cc |
@@ -163,6 +163,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) { |
@@ -232,8 +234,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_SSL_CONNECT; |
+ transport_socket_handle_->socket()->GetPeerAddress(&server_address_); |
+ } |
return result; |
} |
@@ -329,6 +334,11 @@ int SSLConnectJob::DoSSLConnectComplete(int result) { |
connect_timing_.ssl_end = base::TimeTicks::Now(); |
+ if (result != OK && !server_address_.address().empty()) { |
+ connection_attempts_.push_back(ConnectionAttempt(server_address_, result)); |
+ server_address_ = IPEndPoint(); |
+ } |
+ |
SSLClientSocket::NextProtoStatus status = |
SSLClientSocket::kNextProtoUnsupported; |
std::string proto; |