Chromium Code Reviews| OLD | NEW |
|---|---|
| 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/http/http_stream_factory_impl_job.h" | 5 #include "net/http/http_stream_factory_impl_job.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/bind.h" | 10 #include "base/bind.h" |
| (...skipping 902 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 913 was_npn_negotiated_ = true; | 913 was_npn_negotiated_ = true; |
| 914 NextProto protocol_negotiated = | 914 NextProto protocol_negotiated = |
| 915 SSLClientSocket::NextProtoFromString("quic/1+spdy/3"); | 915 SSLClientSocket::NextProtoFromString("quic/1+spdy/3"); |
| 916 protocol_negotiated_ = protocol_negotiated; | 916 protocol_negotiated_ = protocol_negotiated; |
| 917 } else { | 917 } else { |
| 918 SSLClientSocket* ssl_socket = | 918 SSLClientSocket* ssl_socket = |
| 919 static_cast<SSLClientSocket*>(connection_->socket()); | 919 static_cast<SSLClientSocket*>(connection_->socket()); |
| 920 if (ssl_socket->WasNpnNegotiated()) { | 920 if (ssl_socket->WasNpnNegotiated()) { |
| 921 was_npn_negotiated_ = true; | 921 was_npn_negotiated_ = true; |
| 922 std::string proto; | 922 std::string proto; |
| 923 std::string server_protos; | |
| 923 SSLClientSocket::NextProtoStatus status = | 924 SSLClientSocket::NextProtoStatus status = |
| 924 ssl_socket->GetNextProto(&proto); | 925 ssl_socket->GetNextProto(&proto, &server_protos); |
|
wtc
2014/07/31 23:05:24
IMPORTANT: is this change part of the CL? It is un
mshelley
2014/08/02 23:59:14
Done.
| |
| 925 NextProto protocol_negotiated = | 926 NextProto protocol_negotiated = |
| 926 SSLClientSocket::NextProtoFromString(proto); | 927 SSLClientSocket::NextProtoFromString(proto); |
| 927 protocol_negotiated_ = protocol_negotiated; | 928 protocol_negotiated_ = protocol_negotiated; |
| 928 net_log_.AddEvent( | 929 net_log_.AddEvent( |
| 929 NetLog::TYPE_HTTP_STREAM_REQUEST_PROTO, | 930 NetLog::TYPE_HTTP_STREAM_REQUEST_PROTO, |
| 930 base::Bind(&NetLogHttpStreamProtoCallback, | 931 base::Bind(&NetLogHttpStreamProtoCallback, |
| 931 status, &proto)); | 932 status, &proto)); |
| 932 if (ssl_socket->was_spdy_negotiated()) | 933 if (ssl_socket->was_spdy_negotiated()) |
| 933 SwitchToSpdyMode(); | 934 SwitchToSpdyMode(); |
| 934 } | 935 } |
| (...skipping 537 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1472 | 1473 |
| 1473 if (job_status_ == STATUS_SUCCEEDED && other_job_status_ == STATUS_BROKEN) { | 1474 if (job_status_ == STATUS_SUCCEEDED && other_job_status_ == STATUS_BROKEN) { |
| 1474 HistogramBrokenAlternateProtocolLocation( | 1475 HistogramBrokenAlternateProtocolLocation( |
| 1475 BROKEN_ALTERNATE_PROTOCOL_LOCATION_HTTP_STREAM_FACTORY_IMPL_JOB_MAIN); | 1476 BROKEN_ALTERNATE_PROTOCOL_LOCATION_HTTP_STREAM_FACTORY_IMPL_JOB_MAIN); |
| 1476 session_->http_server_properties()->SetBrokenAlternateProtocol( | 1477 session_->http_server_properties()->SetBrokenAlternateProtocol( |
| 1477 HostPortPair::FromURL(request_info_.url)); | 1478 HostPortPair::FromURL(request_info_.url)); |
| 1478 } | 1479 } |
| 1479 } | 1480 } |
| 1480 | 1481 |
| 1481 } // namespace net | 1482 } // namespace net |
| OLD | NEW |