Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(311)

Unified Diff: net/socket/ssl_client_socket_pool.cc

Issue 1006643002: Plumb connection attempts from (non-proxy) ConnectJobs to HttpNetworkTransaction. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Don't copy attempts after reset on proxy HTTPS tunnel response Created 5 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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 342e5ea8825d66b4968eb112cd4381191e51a815..765ea5e1c8b2ebddd90a06b998e256cf72330ca3 100644
--- a/net/socket/ssl_client_socket_pool.cc
+++ b/net/socket/ssl_client_socket_pool.cc
@@ -164,6 +164,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) {
@@ -230,8 +232,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(&direct_address_);
+ }
return result;
}
@@ -322,6 +327,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();
+ }
+
SSLClientSocket::NextProtoStatus status =
SSLClientSocket::kNextProtoUnsupported;
std::string proto;

Powered by Google App Engine
This is Rietveld 408576698