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

Side by Side 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: 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "net/socket/ssl_client_socket_pool.h" 5 #include "net/socket/ssl_client_socket_pool.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/bind_helpers.h" 8 #include "base/bind_helpers.h"
9 #include "base/metrics/field_trial.h" 9 #include "base/metrics/field_trial.h"
10 #include "base/metrics/histogram.h" 10 #include "base/metrics/histogram.h"
(...skipping 226 matching lines...) Expand 10 before | Expand all | Expand 10 after
237 void SSLConnectJob::GetAdditionalErrorState(ClientSocketHandle* handle) { 237 void SSLConnectJob::GetAdditionalErrorState(ClientSocketHandle* handle) {
238 // Headers in |error_response_info_| indicate a proxy tunnel setup 238 // Headers in |error_response_info_| indicate a proxy tunnel setup
239 // problem. See DoTunnelConnectComplete. 239 // problem. See DoTunnelConnectComplete.
240 if (error_response_info_.headers.get()) { 240 if (error_response_info_.headers.get()) {
241 handle->set_pending_http_proxy_connection( 241 handle->set_pending_http_proxy_connection(
242 transport_socket_handle_.release()); 242 transport_socket_handle_.release());
243 } 243 }
244 handle->set_ssl_error_response_info(error_response_info_); 244 handle->set_ssl_error_response_info(error_response_info_);
245 if (!connect_timing_.ssl_start.is_null()) 245 if (!connect_timing_.ssl_start.is_null())
246 handle->set_is_ssl_error(true); 246 handle->set_is_ssl_error(true);
247
248 // If there were any failures establishing the underlying TCP connection,
249 // pass them on.
250 if (transport_socket_handle_) {
251 std::vector<ClientSocketHandle::ConnectionAttempt> attempts;
252 attempts = transport_socket_handle_->connection_attempts();
253 handle->set_connection_attempts(attempts);
Ryan Hamilton 2015/03/12 20:06:04 Can you simply do this: handle->set_connection_at
Deprecated (see juliatuttle) 2015/03/16 15:53:53 Done.
254 }
247 } 255 }
248 256
249 void SSLConnectJob::OnIOComplete(int result) { 257 void SSLConnectJob::OnIOComplete(int result) {
250 int rv = DoLoop(result); 258 int rv = DoLoop(result);
251 if (rv != ERR_IO_PENDING) 259 if (rv != ERR_IO_PENDING)
252 NotifyDelegateOfCompletion(rv); // Deletes |this|. 260 NotifyDelegateOfCompletion(rv); // Deletes |this|.
253 } 261 }
254 262
255 int SSLConnectJob::DoLoop(int result) { 263 int SSLConnectJob::DoLoop(int result) {
256 DCHECK_NE(next_state_, STATE_NONE); 264 DCHECK_NE(next_state_, STATE_NONE);
(...skipping 600 matching lines...) Expand 10 before | Expand all | Expand 10 after
857 CHECK(it != messenger_map_.end()); 865 CHECK(it != messenger_map_.end());
858 delete it->second; 866 delete it->second;
859 messenger_map_.erase(it); 867 messenger_map_.erase(it);
860 } 868 }
861 869
862 void SSLClientSocketPool::OnSSLConfigChanged() { 870 void SSLClientSocketPool::OnSSLConfigChanged() {
863 FlushWithError(ERR_NETWORK_CHANGED); 871 FlushWithError(ERR_NETWORK_CHANGED);
864 } 872 }
865 873
866 } // namespace net 874 } // namespace net
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698