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 |
11 #include "base/bind.h" | 11 #include "base/bind.h" |
12 #include "base/bind_helpers.h" | 12 #include "base/bind_helpers.h" |
13 #include "base/location.h" | 13 #include "base/location.h" |
14 #include "base/logging.h" | 14 #include "base/logging.h" |
15 #include "base/metrics/histogram_macros.h" | 15 #include "base/metrics/histogram_macros.h" |
16 #include "base/metrics/sparse_histogram.h" | 16 #include "base/metrics/sparse_histogram.h" |
17 #include "base/profiler/scoped_tracker.h" | 17 #include "base/profiler/scoped_tracker.h" |
18 #include "base/single_thread_task_runner.h" | 18 #include "base/single_thread_task_runner.h" |
19 #include "base/stl_util.h" | 19 #include "base/stl_util.h" |
20 #include "base/strings/string_number_conversions.h" | 20 #include "base/strings/string_number_conversions.h" |
21 #include "base/strings/string_util.h" | 21 #include "base/strings/string_util.h" |
22 #include "base/strings/stringprintf.h" | 22 #include "base/strings/stringprintf.h" |
23 #include "base/thread_task_runner_handle.h" | 23 #include "base/thread_task_runner_handle.h" |
24 #include "base/values.h" | 24 #include "base/values.h" |
25 #include "build/build_config.h" | 25 #include "build/build_config.h" |
26 #include "net/base/connection_type_histograms.h" | 26 #include "net/base/connection_type_histograms.h" |
27 #include "net/base/port_util.h" | 27 #include "net/base/port_util.h" |
28 #include "net/cert/cert_verifier.h" | 28 #include "net/cert/cert_verifier.h" |
29 #include "net/http/bidirectional_stream_job.h" | 29 #include "net/http/bidirectional_stream_impl.h" |
30 #include "net/http/http_basic_stream.h" | 30 #include "net/http/http_basic_stream.h" |
31 #include "net/http/http_network_session.h" | 31 #include "net/http/http_network_session.h" |
32 #include "net/http/http_proxy_client_socket.h" | 32 #include "net/http/http_proxy_client_socket.h" |
33 #include "net/http/http_proxy_client_socket_pool.h" | 33 #include "net/http/http_proxy_client_socket_pool.h" |
34 #include "net/http/http_request_info.h" | 34 #include "net/http/http_request_info.h" |
35 #include "net/http/http_server_properties.h" | 35 #include "net/http/http_server_properties.h" |
36 #include "net/http/http_stream_factory.h" | 36 #include "net/http/http_stream_factory.h" |
37 #include "net/http/http_stream_factory_impl_request.h" | 37 #include "net/http/http_stream_factory_impl_request.h" |
38 #include "net/log/net_log.h" | 38 #include "net/log/net_log.h" |
39 #include "net/quic/quic_http_stream.h" | 39 #include "net/quic/quic_http_stream.h" |
40 #include "net/socket/client_socket_handle.h" | 40 #include "net/socket/client_socket_handle.h" |
41 #include "net/socket/client_socket_pool.h" | 41 #include "net/socket/client_socket_pool.h" |
42 #include "net/socket/client_socket_pool_manager.h" | 42 #include "net/socket/client_socket_pool_manager.h" |
43 #include "net/socket/socks_client_socket_pool.h" | 43 #include "net/socket/socks_client_socket_pool.h" |
44 #include "net/socket/ssl_client_socket.h" | 44 #include "net/socket/ssl_client_socket.h" |
45 #include "net/socket/ssl_client_socket_pool.h" | 45 #include "net/socket/ssl_client_socket_pool.h" |
46 #include "net/spdy/bidirectional_stream_spdy_job.h" | 46 #include "net/spdy/bidirectional_stream_spdy_impl.h" |
47 #include "net/spdy/spdy_http_stream.h" | 47 #include "net/spdy/spdy_http_stream.h" |
48 #include "net/spdy/spdy_protocol.h" | 48 #include "net/spdy/spdy_protocol.h" |
49 #include "net/spdy/spdy_session.h" | 49 #include "net/spdy/spdy_session.h" |
50 #include "net/spdy/spdy_session_pool.h" | 50 #include "net/spdy/spdy_session_pool.h" |
51 #include "net/ssl/channel_id_service.h" | 51 #include "net/ssl/channel_id_service.h" |
52 #include "net/ssl/ssl_cert_request_info.h" | 52 #include "net/ssl/ssl_cert_request_info.h" |
53 #include "net/ssl/ssl_connection_status_flags.h" | 53 #include "net/ssl/ssl_connection_status_flags.h" |
54 #include "net/ssl/ssl_failure_state.h" | 54 #include "net/ssl/ssl_failure_state.h" |
55 | 55 |
56 namespace net { | 56 namespace net { |
(...skipping 389 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
446 MaybeCopyConnectionAttemptsFromSocketOrHandle(); | 446 MaybeCopyConnectionAttemptsFromSocketOrHandle(); |
447 | 447 |
448 request_->Complete(was_npn_negotiated(), protocol_negotiated(), using_spdy()); | 448 request_->Complete(was_npn_negotiated(), protocol_negotiated(), using_spdy()); |
449 request_->OnWebSocketHandshakeStreamReady(this, | 449 request_->OnWebSocketHandshakeStreamReady(this, |
450 server_ssl_config_, | 450 server_ssl_config_, |
451 proxy_info_, | 451 proxy_info_, |
452 websocket_stream_.release()); | 452 websocket_stream_.release()); |
453 // |this| may be deleted after this call. | 453 // |this| may be deleted after this call. |
454 } | 454 } |
455 | 455 |
456 void HttpStreamFactoryImpl::Job::OnBidirectionalStreamJobReadyCallback() { | 456 void HttpStreamFactoryImpl::Job::OnBidirectionalStreamImplReadyCallback() { |
457 DCHECK(bidirectional_stream_job_); | 457 DCHECK(bidirectional_stream_impl_); |
458 | 458 |
459 MaybeCopyConnectionAttemptsFromSocketOrHandle(); | 459 MaybeCopyConnectionAttemptsFromSocketOrHandle(); |
460 | 460 |
461 if (IsOrphaned()) { | 461 if (IsOrphaned()) { |
462 stream_factory_->OnOrphanedJobComplete(this); | 462 stream_factory_->OnOrphanedJobComplete(this); |
463 } else { | 463 } else { |
464 request_->Complete(was_npn_negotiated(), protocol_negotiated(), | 464 request_->Complete(was_npn_negotiated(), protocol_negotiated(), |
465 using_spdy()); | 465 using_spdy()); |
466 request_->OnBidirectionalStreamJobReady( | 466 request_->OnBidirectionalStreamImplReady( |
467 this, server_ssl_config_, proxy_info_, | 467 this, server_ssl_config_, proxy_info_, |
468 bidirectional_stream_job_.release()); | 468 bidirectional_stream_impl_.release()); |
469 } | 469 } |
470 // |this| may be deleted after this call. | 470 // |this| may be deleted after this call. |
471 } | 471 } |
472 | 472 |
473 void HttpStreamFactoryImpl::Job::OnNewSpdySessionReadyCallback() { | 473 void HttpStreamFactoryImpl::Job::OnNewSpdySessionReadyCallback() { |
474 DCHECK(stream_.get() || bidirectional_stream_job_.get()); | 474 DCHECK(stream_.get() || bidirectional_stream_impl_.get()); |
475 DCHECK(!IsPreconnecting()); | 475 DCHECK(!IsPreconnecting()); |
476 DCHECK(using_spdy()); | 476 DCHECK(using_spdy()); |
477 // Note: an event loop iteration has passed, so |new_spdy_session_| may be | 477 // Note: an event loop iteration has passed, so |new_spdy_session_| may be |
478 // NULL at this point if the SpdySession closed immediately after creation. | 478 // NULL at this point if the SpdySession closed immediately after creation. |
479 base::WeakPtr<SpdySession> spdy_session = new_spdy_session_; | 479 base::WeakPtr<SpdySession> spdy_session = new_spdy_session_; |
480 new_spdy_session_.reset(); | 480 new_spdy_session_.reset(); |
481 | 481 |
482 MaybeCopyConnectionAttemptsFromSocketOrHandle(); | 482 MaybeCopyConnectionAttemptsFromSocketOrHandle(); |
483 | 483 |
484 // TODO(jgraettinger): Notify the factory, and let that notify |request_|, | 484 // TODO(jgraettinger): Notify the factory, and let that notify |request_|, |
485 // rather than notifying |request_| directly. | 485 // rather than notifying |request_| directly. |
486 if (IsOrphaned()) { | 486 if (IsOrphaned()) { |
487 if (spdy_session) { | 487 if (spdy_session) { |
488 stream_factory_->OnNewSpdySessionReady( | 488 stream_factory_->OnNewSpdySessionReady( |
489 spdy_session, spdy_session_direct_, server_ssl_config_, proxy_info_, | 489 spdy_session, spdy_session_direct_, server_ssl_config_, proxy_info_, |
490 was_npn_negotiated(), protocol_negotiated(), using_spdy(), net_log_); | 490 was_npn_negotiated(), protocol_negotiated(), using_spdy(), net_log_); |
491 } | 491 } |
492 stream_factory_->OnOrphanedJobComplete(this); | 492 stream_factory_->OnOrphanedJobComplete(this); |
493 } else { | 493 } else { |
494 if (stream_type_ == HttpStreamRequest::BIDIRECTIONAL_STREAM) { | 494 if (stream_type_ == HttpStreamRequest::BIDIRECTIONAL_STREAM) { |
495 DCHECK(bidirectional_stream_job_); | 495 DCHECK(bidirectional_stream_impl_); |
496 request_->OnNewSpdySessionReady(this, /*spdy_http_stream=*/nullptr, | 496 request_->OnNewSpdySessionReady(this, /*spdy_http_stream=*/nullptr, |
497 std::move(bidirectional_stream_job_), | 497 std::move(bidirectional_stream_impl_), |
498 spdy_session, spdy_session_direct_); | 498 spdy_session, spdy_session_direct_); |
499 } else { | 499 } else { |
500 DCHECK(stream_); | 500 DCHECK(stream_); |
501 request_->OnNewSpdySessionReady(this, std::move(stream_), | 501 request_->OnNewSpdySessionReady(this, std::move(stream_), |
502 /** bidirectional_stream_job=*/nullptr, | 502 /** bidirectional_stream_impl=*/nullptr, |
503 spdy_session, spdy_session_direct_); | 503 spdy_session, spdy_session_direct_); |
504 } | 504 } |
505 } | 505 } |
506 // |this| may be deleted after this call. | 506 // |this| may be deleted after this call. |
507 } | 507 } |
508 | 508 |
509 void HttpStreamFactoryImpl::Job::OnStreamFailedCallback(int result) { | 509 void HttpStreamFactoryImpl::Job::OnStreamFailedCallback(int result) { |
510 DCHECK(!IsPreconnecting()); | 510 DCHECK(!IsPreconnecting()); |
511 | 511 |
512 MaybeCopyConnectionAttemptsFromSocketOrHandle(); | 512 MaybeCopyConnectionAttemptsFromSocketOrHandle(); |
(...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
686 if (new_spdy_session_.get()) { | 686 if (new_spdy_session_.get()) { |
687 base::ThreadTaskRunnerHandle::Get()->PostTask( | 687 base::ThreadTaskRunnerHandle::Get()->PostTask( |
688 FROM_HERE, base::Bind(&Job::OnNewSpdySessionReadyCallback, | 688 FROM_HERE, base::Bind(&Job::OnNewSpdySessionReadyCallback, |
689 ptr_factory_.GetWeakPtr())); | 689 ptr_factory_.GetWeakPtr())); |
690 } else if (stream_factory_->for_websockets_) { | 690 } else if (stream_factory_->for_websockets_) { |
691 DCHECK(websocket_stream_); | 691 DCHECK(websocket_stream_); |
692 base::ThreadTaskRunnerHandle::Get()->PostTask( | 692 base::ThreadTaskRunnerHandle::Get()->PostTask( |
693 FROM_HERE, base::Bind(&Job::OnWebSocketHandshakeStreamReadyCallback, | 693 FROM_HERE, base::Bind(&Job::OnWebSocketHandshakeStreamReadyCallback, |
694 ptr_factory_.GetWeakPtr())); | 694 ptr_factory_.GetWeakPtr())); |
695 } else if (stream_type_ == HttpStreamRequest::BIDIRECTIONAL_STREAM) { | 695 } else if (stream_type_ == HttpStreamRequest::BIDIRECTIONAL_STREAM) { |
696 if (!bidirectional_stream_job_) { | 696 if (!bidirectional_stream_impl_) { |
697 base::ThreadTaskRunnerHandle::Get()->PostTask( | 697 base::ThreadTaskRunnerHandle::Get()->PostTask( |
698 FROM_HERE, base::Bind(&Job::OnStreamFailedCallback, | 698 FROM_HERE, base::Bind(&Job::OnStreamFailedCallback, |
699 ptr_factory_.GetWeakPtr(), ERR_FAILED)); | 699 ptr_factory_.GetWeakPtr(), ERR_FAILED)); |
700 } else { | 700 } else { |
701 base::ThreadTaskRunnerHandle::Get()->PostTask( | 701 base::ThreadTaskRunnerHandle::Get()->PostTask( |
702 FROM_HERE, base::Bind(&Job::OnBidirectionalStreamJobReadyCallback, | 702 FROM_HERE, |
703 ptr_factory_.GetWeakPtr())); | 703 base::Bind(&Job::OnBidirectionalStreamImplReadyCallback, |
| 704 ptr_factory_.GetWeakPtr())); |
704 } | 705 } |
705 } else { | 706 } else { |
706 DCHECK(stream_.get()); | 707 DCHECK(stream_.get()); |
707 job_stream_ready_start_time_ = base::TimeTicks::Now(); | 708 job_stream_ready_start_time_ = base::TimeTicks::Now(); |
708 base::ThreadTaskRunnerHandle::Get()->PostTask( | 709 base::ThreadTaskRunnerHandle::Get()->PostTask( |
709 FROM_HERE, | 710 FROM_HERE, |
710 base::Bind(&Job::OnStreamReadyCallback, ptr_factory_.GetWeakPtr())); | 711 base::Bind(&Job::OnStreamReadyCallback, ptr_factory_.GetWeakPtr())); |
711 } | 712 } |
712 return ERR_IO_PENDING; | 713 return ERR_IO_PENDING; |
713 | 714 |
(...skipping 522 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1236 return result; | 1237 return result; |
1237 } | 1238 } |
1238 | 1239 |
1239 if (using_quic_) { | 1240 if (using_quic_) { |
1240 if (result < 0) { | 1241 if (result < 0) { |
1241 job_status_ = STATUS_BROKEN; | 1242 job_status_ = STATUS_BROKEN; |
1242 MaybeMarkAlternativeServiceBroken(); | 1243 MaybeMarkAlternativeServiceBroken(); |
1243 return result; | 1244 return result; |
1244 } | 1245 } |
1245 if (stream_type_ == HttpStreamRequest::BIDIRECTIONAL_STREAM) { | 1246 if (stream_type_ == HttpStreamRequest::BIDIRECTIONAL_STREAM) { |
1246 bidirectional_stream_job_ = quic_request_.CreateBidirectionalStreamJob(); | 1247 bidirectional_stream_impl_ = |
1247 if (!bidirectional_stream_job_) { | 1248 quic_request_.CreateBidirectionalStreamImpl(); |
| 1249 if (!bidirectional_stream_impl_) { |
1248 // Quic session is closed before stream can be created. | 1250 // Quic session is closed before stream can be created. |
1249 return ERR_CONNECTION_CLOSED; | 1251 return ERR_CONNECTION_CLOSED; |
1250 } | 1252 } |
1251 } else { | 1253 } else { |
1252 stream_ = quic_request_.CreateStream(); | 1254 stream_ = quic_request_.CreateStream(); |
1253 if (!stream_) { | 1255 if (!stream_) { |
1254 // Quic session is closed before stream can be created. | 1256 // Quic session is closed before stream can be created. |
1255 return ERR_CONNECTION_CLOSED; | 1257 return ERR_CONNECTION_CLOSED; |
1256 } | 1258 } |
1257 } | 1259 } |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1297 | 1299 |
1298 int HttpStreamFactoryImpl::Job::DoWaitingUserAction(int result) { | 1300 int HttpStreamFactoryImpl::Job::DoWaitingUserAction(int result) { |
1299 // This state indicates that the stream request is in a partially | 1301 // This state indicates that the stream request is in a partially |
1300 // completed state, and we've called back to the delegate for more | 1302 // completed state, and we've called back to the delegate for more |
1301 // information. | 1303 // information. |
1302 | 1304 |
1303 // We're always waiting here for the delegate to call us back. | 1305 // We're always waiting here for the delegate to call us back. |
1304 return ERR_IO_PENDING; | 1306 return ERR_IO_PENDING; |
1305 } | 1307 } |
1306 | 1308 |
1307 int HttpStreamFactoryImpl::Job::SetSpdyHttpStreamOrBidirectionalStreamJob( | 1309 int HttpStreamFactoryImpl::Job::SetSpdyHttpStreamOrBidirectionalStreamImpl( |
1308 base::WeakPtr<SpdySession> session, | 1310 base::WeakPtr<SpdySession> session, |
1309 bool direct) { | 1311 bool direct) { |
1310 // TODO(ricea): Restore the code for WebSockets over SPDY once it's | 1312 // TODO(ricea): Restore the code for WebSockets over SPDY once it's |
1311 // implemented. | 1313 // implemented. |
1312 if (stream_factory_->for_websockets_) | 1314 if (stream_factory_->for_websockets_) |
1313 return ERR_NOT_IMPLEMENTED; | 1315 return ERR_NOT_IMPLEMENTED; |
1314 if (stream_type_ == HttpStreamRequest::BIDIRECTIONAL_STREAM) { | 1316 if (stream_type_ == HttpStreamRequest::BIDIRECTIONAL_STREAM) { |
1315 bidirectional_stream_job_.reset(new BidirectionalStreamSpdyJob(session)); | 1317 bidirectional_stream_impl_.reset(new BidirectionalStreamSpdyImpl(session)); |
1316 return OK; | 1318 return OK; |
1317 } | 1319 } |
1318 | 1320 |
1319 // TODO(willchan): Delete this code, because eventually, the | 1321 // TODO(willchan): Delete this code, because eventually, the |
1320 // HttpStreamFactoryImpl will be creating all the SpdyHttpStreams, since it | 1322 // HttpStreamFactoryImpl will be creating all the SpdyHttpStreams, since it |
1321 // will know when SpdySessions become available. | 1323 // will know when SpdySessions become available. |
1322 | 1324 |
1323 bool use_relative_url = direct || request_info_.url.SchemeIs("https"); | 1325 bool use_relative_url = direct || request_info_.url.SchemeIs("https"); |
1324 stream_.reset(new SpdyHttpStream(session, use_relative_url)); | 1326 stream_.reset(new SpdyHttpStream(session, use_relative_url)); |
1325 return OK; | 1327 return OK; |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1368 | 1370 |
1369 CHECK(!stream_.get()); | 1371 CHECK(!stream_.get()); |
1370 | 1372 |
1371 bool direct = !IsHttpsProxyAndHttpUrl(); | 1373 bool direct = !IsHttpsProxyAndHttpUrl(); |
1372 if (existing_spdy_session_.get()) { | 1374 if (existing_spdy_session_.get()) { |
1373 // We picked up an existing session, so we don't need our socket. | 1375 // We picked up an existing session, so we don't need our socket. |
1374 if (connection_->socket()) | 1376 if (connection_->socket()) |
1375 connection_->socket()->Disconnect(); | 1377 connection_->socket()->Disconnect(); |
1376 connection_->Reset(); | 1378 connection_->Reset(); |
1377 | 1379 |
1378 int set_result = SetSpdyHttpStreamOrBidirectionalStreamJob( | 1380 int set_result = SetSpdyHttpStreamOrBidirectionalStreamImpl( |
1379 existing_spdy_session_, direct); | 1381 existing_spdy_session_, direct); |
1380 existing_spdy_session_.reset(); | 1382 existing_spdy_session_.reset(); |
1381 return set_result; | 1383 return set_result; |
1382 } | 1384 } |
1383 | 1385 |
1384 SpdySessionKey spdy_session_key = GetSpdySessionKey(); | 1386 SpdySessionKey spdy_session_key = GetSpdySessionKey(); |
1385 base::WeakPtr<SpdySession> spdy_session; | 1387 base::WeakPtr<SpdySession> spdy_session; |
1386 int result = valid_spdy_session_pool_->FindAvailableSession( | 1388 int result = valid_spdy_session_pool_->FindAvailableSession( |
1387 spdy_session_key, net_log_, &spdy_session); | 1389 spdy_session_key, net_log_, &spdy_session); |
1388 if (result != OK) { | 1390 if (result != OK) { |
1389 return result; | 1391 return result; |
1390 } | 1392 } |
1391 if (spdy_session) { | 1393 if (spdy_session) { |
1392 return SetSpdyHttpStreamOrBidirectionalStreamJob(spdy_session, direct); | 1394 return SetSpdyHttpStreamOrBidirectionalStreamImpl(spdy_session, direct); |
1393 } | 1395 } |
1394 | 1396 |
1395 result = valid_spdy_session_pool_->CreateAvailableSessionFromSocket( | 1397 result = valid_spdy_session_pool_->CreateAvailableSessionFromSocket( |
1396 spdy_session_key, std::move(connection_), net_log_, | 1398 spdy_session_key, std::move(connection_), net_log_, |
1397 spdy_certificate_error_, using_ssl_, &spdy_session); | 1399 spdy_certificate_error_, using_ssl_, &spdy_session); |
1398 if (result != OK) { | 1400 if (result != OK) { |
1399 return result; | 1401 return result; |
1400 } | 1402 } |
1401 | 1403 |
1402 if (!spdy_session->HasAcceptableTransportSecurity()) { | 1404 if (!spdy_session->HasAcceptableTransportSecurity()) { |
(...skipping 14 matching lines...) Expand all Loading... |
1417 } | 1419 } |
1418 | 1420 |
1419 new_spdy_session_ = spdy_session; | 1421 new_spdy_session_ = spdy_session; |
1420 spdy_session_direct_ = direct; | 1422 spdy_session_direct_ = direct; |
1421 const HostPortPair& host_port_pair = spdy_session_key.host_port_pair(); | 1423 const HostPortPair& host_port_pair = spdy_session_key.host_port_pair(); |
1422 base::WeakPtr<HttpServerProperties> http_server_properties = | 1424 base::WeakPtr<HttpServerProperties> http_server_properties = |
1423 session_->http_server_properties(); | 1425 session_->http_server_properties(); |
1424 if (http_server_properties) | 1426 if (http_server_properties) |
1425 http_server_properties->SetSupportsSpdy(host_port_pair, true); | 1427 http_server_properties->SetSupportsSpdy(host_port_pair, true); |
1426 | 1428 |
1427 // Create a SpdyHttpStream or a BidirectionalStreamJob attached to the | 1429 // Create a SpdyHttpStream or a BidirectionalStreamImpl attached to the |
1428 // session; OnNewSpdySessionReadyCallback is not called until an event loop | 1430 // session; OnNewSpdySessionReadyCallback is not called until an event loop |
1429 // iteration later, so if the SpdySession is closed between then, allow | 1431 // iteration later, so if the SpdySession is closed between then, allow |
1430 // reuse state from the underlying socket, sampled by SpdyHttpStream, | 1432 // reuse state from the underlying socket, sampled by SpdyHttpStream, |
1431 // bubble up to the request. | 1433 // bubble up to the request. |
1432 return SetSpdyHttpStreamOrBidirectionalStreamJob(new_spdy_session_, | 1434 return SetSpdyHttpStreamOrBidirectionalStreamImpl(new_spdy_session_, |
1433 spdy_session_direct_); | 1435 spdy_session_direct_); |
1434 } | 1436 } |
1435 | 1437 |
1436 int HttpStreamFactoryImpl::Job::DoCreateStreamComplete(int result) { | 1438 int HttpStreamFactoryImpl::Job::DoCreateStreamComplete(int result) { |
1437 if (result < 0) | 1439 if (result < 0) |
1438 return result; | 1440 return result; |
1439 | 1441 |
1440 session_->proxy_service()->ReportSuccess(proxy_info_, | 1442 session_->proxy_service()->ReportSuccess(proxy_info_, |
1441 session_->params().proxy_delegate); | 1443 session_->params().proxy_delegate); |
1442 next_state_ = STATE_NONE; | 1444 next_state_ = STATE_NONE; |
1443 return OK; | 1445 return OK; |
(...skipping 349 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1793 if (connection_->socket()) { | 1795 if (connection_->socket()) { |
1794 ConnectionAttempts socket_attempts; | 1796 ConnectionAttempts socket_attempts; |
1795 connection_->socket()->GetConnectionAttempts(&socket_attempts); | 1797 connection_->socket()->GetConnectionAttempts(&socket_attempts); |
1796 request_->AddConnectionAttempts(socket_attempts); | 1798 request_->AddConnectionAttempts(socket_attempts); |
1797 } else { | 1799 } else { |
1798 request_->AddConnectionAttempts(connection_->connection_attempts()); | 1800 request_->AddConnectionAttempts(connection_->connection_attempts()); |
1799 } | 1801 } |
1800 } | 1802 } |
1801 | 1803 |
1802 } // namespace net | 1804 } // namespace net |
OLD | NEW |