| 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 #include <utility> | 9 #include <utility> |
| 10 | 10 |
| (...skipping 1401 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1412 if (spdy_session->GetProtocolVersion() >= HTTP2 && | 1412 if (spdy_session->GetProtocolVersion() >= HTTP2 && |
| 1413 spdy_session->GetSSLInfo(&ssl_info, &was_npn_negotiated, | 1413 spdy_session->GetSSLInfo(&ssl_info, &was_npn_negotiated, |
| 1414 &protocol_negotiated)) { | 1414 &protocol_negotiated)) { |
| 1415 UMA_HISTOGRAM_SPARSE_SLOWLY( | 1415 UMA_HISTOGRAM_SPARSE_SLOWLY( |
| 1416 "Net.Http2SSLCipherSuite", | 1416 "Net.Http2SSLCipherSuite", |
| 1417 SSLConnectionStatusToCipherSuite(ssl_info.connection_status)); | 1417 SSLConnectionStatusToCipherSuite(ssl_info.connection_status)); |
| 1418 } | 1418 } |
| 1419 | 1419 |
| 1420 new_spdy_session_ = spdy_session; | 1420 new_spdy_session_ = spdy_session; |
| 1421 spdy_session_direct_ = direct; | 1421 spdy_session_direct_ = direct; |
| 1422 const HostPortPair& host_port_pair = spdy_session_key.host_port_pair(); | 1422 const HostPortPair host_port_pair = spdy_session_key.host_port_pair(); |
| 1423 // TODO(zhongyi): extract SHP w/o modify spdy_session_key. |
| 1424 const url::SchemeHostPort server("http", host_port_pair.host(), |
| 1425 host_port_pair.port()); |
| 1426 |
| 1423 base::WeakPtr<HttpServerProperties> http_server_properties = | 1427 base::WeakPtr<HttpServerProperties> http_server_properties = |
| 1424 session_->http_server_properties(); | 1428 session_->http_server_properties(); |
| 1425 if (http_server_properties) | 1429 if (http_server_properties) |
| 1426 http_server_properties->SetSupportsSpdy(host_port_pair, true); | 1430 http_server_properties->SetSupportsSpdy(server, true); |
| 1427 | 1431 |
| 1428 // Create a SpdyHttpStream or a BidirectionalStreamImpl attached to the | 1432 // Create a SpdyHttpStream or a BidirectionalStreamImpl attached to the |
| 1429 // session; OnNewSpdySessionReadyCallback is not called until an event loop | 1433 // session; OnNewSpdySessionReadyCallback is not called until an event loop |
| 1430 // iteration later, so if the SpdySession is closed between then, allow | 1434 // iteration later, so if the SpdySession is closed between then, allow |
| 1431 // reuse state from the underlying socket, sampled by SpdyHttpStream, | 1435 // reuse state from the underlying socket, sampled by SpdyHttpStream, |
| 1432 // bubble up to the request. | 1436 // bubble up to the request. |
| 1433 return SetSpdyHttpStreamOrBidirectionalStreamImpl(new_spdy_session_, | 1437 return SetSpdyHttpStreamOrBidirectionalStreamImpl(new_spdy_session_, |
| 1434 spdy_session_direct_); | 1438 spdy_session_direct_); |
| 1435 } | 1439 } |
| 1436 | 1440 |
| (...skipping 356 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1793 if (connection_->socket()) { | 1797 if (connection_->socket()) { |
| 1794 ConnectionAttempts socket_attempts; | 1798 ConnectionAttempts socket_attempts; |
| 1795 connection_->socket()->GetConnectionAttempts(&socket_attempts); | 1799 connection_->socket()->GetConnectionAttempts(&socket_attempts); |
| 1796 request_->AddConnectionAttempts(socket_attempts); | 1800 request_->AddConnectionAttempts(socket_attempts); |
| 1797 } else { | 1801 } else { |
| 1798 request_->AddConnectionAttempts(connection_->connection_attempts()); | 1802 request_->AddConnectionAttempts(connection_->connection_attempts()); |
| 1799 } | 1803 } |
| 1800 } | 1804 } |
| 1801 | 1805 |
| 1802 } // namespace net | 1806 } // namespace net |
| OLD | NEW |