| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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/metrics/histogram.h" | 7 #include "base/metrics/histogram.h" |
| 8 #include "base/values.h" | 8 #include "base/values.h" |
| 9 #include "net/base/net_errors.h" | 9 #include "net/base/net_errors.h" |
| 10 #include "net/base/host_port_pair.h" | 10 #include "net/base/host_port_pair.h" |
| (...skipping 184 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 195 | 195 |
| 196 int SSLConnectJob::DoTCPConnect() { | 196 int SSLConnectJob::DoTCPConnect() { |
| 197 DCHECK(tcp_pool_); | 197 DCHECK(tcp_pool_); |
| 198 | 198 |
| 199 if (ssl_host_info_factory_) { | 199 if (ssl_host_info_factory_) { |
| 200 ssl_host_info_.reset( | 200 ssl_host_info_.reset( |
| 201 ssl_host_info_factory_->GetForHost(params_->host_and_port().host(), | 201 ssl_host_info_factory_->GetForHost(params_->host_and_port().host(), |
| 202 params_->ssl_config())); | 202 params_->ssl_config())); |
| 203 } | 203 } |
| 204 | 204 |
| 205 if (dnsrr_resolver_) | 205 if (ssl_host_info_.get()) { |
| 206 ssl_host_info_->StartDnsLookup(dnsrr_resolver_); | 206 if (dnsrr_resolver_) |
| 207 ssl_host_info_->StartDnsLookup(dnsrr_resolver_); |
| 207 | 208 |
| 208 if (ssl_host_info_.get()) { | |
| 209 // This starts fetching the SSL host info from the disk cache for Snap | 209 // This starts fetching the SSL host info from the disk cache for Snap |
| 210 // Start. | 210 // Start. |
| 211 ssl_host_info_->Start(); | 211 ssl_host_info_->Start(); |
| 212 } | 212 } |
| 213 | 213 |
| 214 next_state_ = STATE_TCP_CONNECT_COMPLETE; | 214 next_state_ = STATE_TCP_CONNECT_COMPLETE; |
| 215 transport_socket_handle_.reset(new ClientSocketHandle()); | 215 transport_socket_handle_.reset(new ClientSocketHandle()); |
| 216 scoped_refptr<TCPSocketParams> tcp_params = params_->tcp_params(); | 216 scoped_refptr<TCPSocketParams> tcp_params = params_->tcp_params(); |
| 217 return transport_socket_handle_->Init(group_name(), tcp_params, | 217 return transport_socket_handle_->Init(group_name(), tcp_params, |
| 218 tcp_params->destination().priority(), | 218 tcp_params->destination().priority(), |
| (...skipping 318 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 537 | 537 |
| 538 base::TimeDelta SSLClientSocketPool::ConnectionTimeout() const { | 538 base::TimeDelta SSLClientSocketPool::ConnectionTimeout() const { |
| 539 return base_.ConnectionTimeout(); | 539 return base_.ConnectionTimeout(); |
| 540 } | 540 } |
| 541 | 541 |
| 542 ClientSocketPoolHistograms* SSLClientSocketPool::histograms() const { | 542 ClientSocketPoolHistograms* SSLClientSocketPool::histograms() const { |
| 543 return base_.histograms(); | 543 return base_.histograms(); |
| 544 } | 544 } |
| 545 | 545 |
| 546 } // namespace net | 546 } // namespace net |
| OLD | NEW |