| Index: net/http/http_stream_factory_impl_job.cc
|
| diff --git a/net/http/http_stream_factory_impl_job.cc b/net/http/http_stream_factory_impl_job.cc
|
| index 57148a71da61bf9fa5f99521f3d690240fe2e0df..e25915a45e67be1e1c96c71d7db221cd94a0ecd9 100644
|
| --- a/net/http/http_stream_factory_impl_job.cc
|
| +++ b/net/http/http_stream_factory_impl_job.cc
|
| @@ -296,7 +296,7 @@ void HttpStreamFactoryImpl::Job::OnStreamReadyCallback() {
|
| DCHECK(!IsPreconnecting());
|
| DCHECK(!stream_factory_->for_websockets_);
|
|
|
| - MaybeCopyConnectionAttemptsFromClientSocketHandleToRequest();
|
| + MaybeCopyConnectionAttempts();
|
|
|
| if (IsOrphaned()) {
|
| stream_factory_->OnOrphanedJobComplete(this);
|
| @@ -319,7 +319,7 @@ void HttpStreamFactoryImpl::Job::OnWebSocketHandshakeStreamReadyCallback() {
|
| // never be ready.
|
| DCHECK(!IsOrphaned());
|
|
|
| - MaybeCopyConnectionAttemptsFromClientSocketHandleToRequest();
|
| + MaybeCopyConnectionAttempts();
|
|
|
| request_->Complete(was_npn_negotiated(),
|
| protocol_negotiated(),
|
| @@ -341,7 +341,7 @@ void HttpStreamFactoryImpl::Job::OnNewSpdySessionReadyCallback() {
|
| base::WeakPtr<SpdySession> spdy_session = new_spdy_session_;
|
| new_spdy_session_.reset();
|
|
|
| - MaybeCopyConnectionAttemptsFromClientSocketHandleToRequest();
|
| + MaybeCopyConnectionAttempts();
|
|
|
| // TODO(jgraettinger): Notify the factory, and let that notify |request_|,
|
| // rather than notifying |request_| directly.
|
| @@ -362,7 +362,7 @@ void HttpStreamFactoryImpl::Job::OnNewSpdySessionReadyCallback() {
|
| void HttpStreamFactoryImpl::Job::OnStreamFailedCallback(int result) {
|
| DCHECK(!IsPreconnecting());
|
|
|
| - MaybeCopyConnectionAttemptsFromClientSocketHandleToRequest();
|
| + MaybeCopyConnectionAttempts();
|
|
|
| if (IsOrphaned())
|
| stream_factory_->OnOrphanedJobComplete(this);
|
| @@ -375,7 +375,7 @@ void HttpStreamFactoryImpl::Job::OnCertificateErrorCallback(
|
| int result, const SSLInfo& ssl_info) {
|
| DCHECK(!IsPreconnecting());
|
|
|
| - MaybeCopyConnectionAttemptsFromClientSocketHandleToRequest();
|
| + MaybeCopyConnectionAttempts();
|
|
|
| if (IsOrphaned())
|
| stream_factory_->OnOrphanedJobComplete(this);
|
| @@ -1512,12 +1512,17 @@ HttpStreamFactoryImpl::Job::GetSocketGroup() const {
|
| return ClientSocketPoolManager::NORMAL_GROUP;
|
| }
|
|
|
| -void HttpStreamFactoryImpl::Job::
|
| - MaybeCopyConnectionAttemptsFromClientSocketHandleToRequest() {
|
| +void HttpStreamFactoryImpl::Job::MaybeCopyConnectionAttempts() {
|
| if (IsOrphaned() || !connection_)
|
| return;
|
|
|
| - request_->AddConnectionAttempts(connection_->connection_attempts());
|
| + if (connection_->socket()) {
|
| + ConnectionAttempts socket_attempts;
|
| + connection_->socket()->GetConnectionAttempts(&socket_attempts);
|
| + request_->AddConnectionAttempts(socket_attempts);
|
| + } else {
|
| + request_->AddConnectionAttempts(connection_->connection_attempts());
|
| + }
|
| }
|
|
|
| } // namespace net
|
|
|