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 1186 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1197 SpdySessionKey spdy_session_key = GetSpdySessionKey(); | 1197 SpdySessionKey spdy_session_key = GetSpdySessionKey(); |
1198 base::WeakPtr<SpdySession> spdy_session = | 1198 base::WeakPtr<SpdySession> spdy_session = |
1199 session_->spdy_session_pool()->FindAvailableSession( | 1199 session_->spdy_session_pool()->FindAvailableSession( |
1200 spdy_session_key, origin_url_, net_log_); | 1200 spdy_session_key, origin_url_, net_log_); |
1201 if (spdy_session) { | 1201 if (spdy_session) { |
1202 return SetSpdyHttpStreamOrBidirectionalStreamImpl(spdy_session, direct); | 1202 return SetSpdyHttpStreamOrBidirectionalStreamImpl(spdy_session, direct); |
1203 } | 1203 } |
1204 | 1204 |
1205 spdy_session = | 1205 spdy_session = |
1206 session_->spdy_session_pool()->CreateAvailableSessionFromSocket( | 1206 session_->spdy_session_pool()->CreateAvailableSessionFromSocket( |
1207 spdy_session_key, std::move(connection_), net_log_, OK, using_ssl_); | 1207 spdy_session_key, std::move(connection_), net_log_, using_ssl_); |
1208 | 1208 |
1209 if (!spdy_session->HasAcceptableTransportSecurity()) { | 1209 if (!spdy_session->HasAcceptableTransportSecurity()) { |
1210 spdy_session->CloseSessionOnError( | 1210 spdy_session->CloseSessionOnError( |
1211 ERR_SPDY_INADEQUATE_TRANSPORT_SECURITY, ""); | 1211 ERR_SPDY_INADEQUATE_TRANSPORT_SECURITY, ""); |
1212 return ERR_SPDY_INADEQUATE_TRANSPORT_SECURITY; | 1212 return ERR_SPDY_INADEQUATE_TRANSPORT_SECURITY; |
1213 } | 1213 } |
1214 | 1214 |
1215 SSLInfo ssl_info; | 1215 SSLInfo ssl_info; |
1216 if (spdy_session->GetSSLInfo(&ssl_info)) { | 1216 if (spdy_session->GetSSLInfo(&ssl_info)) { |
1217 UMA_HISTOGRAM_SPARSE_SLOWLY( | 1217 UMA_HISTOGRAM_SPARSE_SLOWLY( |
(...skipping 282 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1500 | 1500 |
1501 ConnectionAttempts socket_attempts = connection_->connection_attempts(); | 1501 ConnectionAttempts socket_attempts = connection_->connection_attempts(); |
1502 if (connection_->socket()) { | 1502 if (connection_->socket()) { |
1503 connection_->socket()->GetConnectionAttempts(&socket_attempts); | 1503 connection_->socket()->GetConnectionAttempts(&socket_attempts); |
1504 } | 1504 } |
1505 | 1505 |
1506 delegate_->AddConnectionAttemptsToRequest(this, socket_attempts); | 1506 delegate_->AddConnectionAttemptsToRequest(this, socket_attempts); |
1507 } | 1507 } |
1508 | 1508 |
1509 } // namespace net | 1509 } // namespace net |
OLD | NEW |