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

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: rebase, resolve conflict Created 5 years, 8 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
« no previous file with comments | « net/socket/ssl_client_socket_pool.h ('k') | net/socket/ssl_client_socket_pool_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 3426622756b9c657e8339416e74f0ad68ae99a51..e0a7e3be237f68dd67ace68b3872bdddcba9a551 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();
+ }
+
// If we want SPDY over ALPN/NPN, make sure it succeeded.
if (params_->want_spdy_over_npn() &&
!NextProtoIsSPDY(ssl_socket_->GetNegotiatedProtocol())) {
« no previous file with comments | « net/socket/ssl_client_socket_pool.h ('k') | net/socket/ssl_client_socket_pool_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698