| 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/http/http_network_transaction.h" | 5 #include "net/http/http_network_transaction.h" |
| 6 | 6 |
| 7 #include "base/compiler_specific.h" | 7 #include "base/compiler_specific.h" |
| 8 #include "base/field_trial.h" | 8 #include "base/field_trial.h" |
| 9 #include "base/format_macros.h" | 9 #include "base/format_macros.h" |
| 10 #include "base/histogram.h" | 10 #include "base/histogram.h" |
| (...skipping 835 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 846 if (request_->load_flags & LOAD_VERIFY_EV_CERT) | 846 if (request_->load_flags & LOAD_VERIFY_EV_CERT) |
| 847 ssl_config_.verify_ev_cert = true; | 847 ssl_config_.verify_ev_cert = true; |
| 848 | 848 |
| 849 ssl_connect_start_time_ = base::TimeTicks::Now(); | 849 ssl_connect_start_time_ = base::TimeTicks::Now(); |
| 850 | 850 |
| 851 // Add a SSL socket on top of our existing transport socket. | 851 // Add a SSL socket on top of our existing transport socket. |
| 852 ClientSocket* s = connection_->release_socket(); | 852 ClientSocket* s = connection_->release_socket(); |
| 853 s = session_->socket_factory()->CreateSSLClientSocket( | 853 s = session_->socket_factory()->CreateSSLClientSocket( |
| 854 s, request_->url.HostNoBrackets(), ssl_config_); | 854 s, request_->url.HostNoBrackets(), ssl_config_); |
| 855 connection_->set_socket(s); | 855 connection_->set_socket(s); |
| 856 return connection_->socket()->Connect(&io_callback_, net_log_); | 856 return connection_->socket()->Connect(&io_callback_); |
| 857 } | 857 } |
| 858 | 858 |
| 859 int HttpNetworkTransaction::DoSSLConnectComplete(int result) { | 859 int HttpNetworkTransaction::DoSSLConnectComplete(int result) { |
| 860 SSLClientSocket* ssl_socket = | 860 SSLClientSocket* ssl_socket = |
| 861 reinterpret_cast<SSLClientSocket*>(connection_->socket()); | 861 reinterpret_cast<SSLClientSocket*>(connection_->socket()); |
| 862 | 862 |
| 863 SSLClientSocket::NextProtoStatus status = | 863 SSLClientSocket::NextProtoStatus status = |
| 864 SSLClientSocket::kNextProtoUnsupported; | 864 SSLClientSocket::kNextProtoUnsupported; |
| 865 std::string proto; | 865 std::string proto; |
| 866 // GetNextProto will fail and and trigger a NOTREACHED if we pass in a socket | 866 // GetNextProto will fail and and trigger a NOTREACHED if we pass in a socket |
| (...skipping 1120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1987 http_host_port_pair); | 1987 http_host_port_pair); |
| 1988 | 1988 |
| 1989 alternate_protocol_mode_ = kDoNotUseAlternateProtocol; | 1989 alternate_protocol_mode_ = kDoNotUseAlternateProtocol; |
| 1990 if (connection_->socket()) | 1990 if (connection_->socket()) |
| 1991 connection_->socket()->Disconnect(); | 1991 connection_->socket()->Disconnect(); |
| 1992 connection_->Reset(); | 1992 connection_->Reset(); |
| 1993 next_state_ = STATE_INIT_CONNECTION; | 1993 next_state_ = STATE_INIT_CONNECTION; |
| 1994 } | 1994 } |
| 1995 | 1995 |
| 1996 } // namespace net | 1996 } // namespace net |
| OLD | NEW |