Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(107)

Side by Side Diff: net/http/http_stream_factory_impl_job.cc

Issue 1812823010: Rename net::BidirectionalStream*Job to net::BidirectionalStream*Impl (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebased Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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 171 matching lines...) Expand 10 before | Expand all | Expand 10 after
684 if (new_spdy_session_.get()) { 684 if (new_spdy_session_.get()) {
685 base::ThreadTaskRunnerHandle::Get()->PostTask( 685 base::ThreadTaskRunnerHandle::Get()->PostTask(
686 FROM_HERE, base::Bind(&Job::OnNewSpdySessionReadyCallback, 686 FROM_HERE, base::Bind(&Job::OnNewSpdySessionReadyCallback,
687 ptr_factory_.GetWeakPtr())); 687 ptr_factory_.GetWeakPtr()));
688 } else if (stream_factory_->for_websockets_) { 688 } else if (stream_factory_->for_websockets_) {
689 DCHECK(websocket_stream_); 689 DCHECK(websocket_stream_);
690 base::ThreadTaskRunnerHandle::Get()->PostTask( 690 base::ThreadTaskRunnerHandle::Get()->PostTask(
691 FROM_HERE, base::Bind(&Job::OnWebSocketHandshakeStreamReadyCallback, 691 FROM_HERE, base::Bind(&Job::OnWebSocketHandshakeStreamReadyCallback,
692 ptr_factory_.GetWeakPtr())); 692 ptr_factory_.GetWeakPtr()));
693 } else if (stream_type_ == HttpStreamRequest::BIDIRECTIONAL_STREAM) { 693 } else if (stream_type_ == HttpStreamRequest::BIDIRECTIONAL_STREAM) {
694 if (!bidirectional_stream_job_) { 694 if (!bidirectional_stream_impl_) {
695 base::ThreadTaskRunnerHandle::Get()->PostTask( 695 base::ThreadTaskRunnerHandle::Get()->PostTask(
696 FROM_HERE, base::Bind(&Job::OnStreamFailedCallback, 696 FROM_HERE, base::Bind(&Job::OnStreamFailedCallback,
697 ptr_factory_.GetWeakPtr(), ERR_FAILED)); 697 ptr_factory_.GetWeakPtr(), ERR_FAILED));
698 } else { 698 } else {
699 base::ThreadTaskRunnerHandle::Get()->PostTask( 699 base::ThreadTaskRunnerHandle::Get()->PostTask(
700 FROM_HERE, base::Bind(&Job::OnBidirectionalStreamJobReadyCallback, 700 FROM_HERE,
701 ptr_factory_.GetWeakPtr())); 701 base::Bind(&Job::OnBidirectionalStreamImplReadyCallback,
702 ptr_factory_.GetWeakPtr()));
702 } 703 }
703 } else { 704 } else {
704 DCHECK(stream_.get()); 705 DCHECK(stream_.get());
705 job_stream_ready_start_time_ = base::TimeTicks::Now(); 706 job_stream_ready_start_time_ = base::TimeTicks::Now();
706 base::ThreadTaskRunnerHandle::Get()->PostTask( 707 base::ThreadTaskRunnerHandle::Get()->PostTask(
707 FROM_HERE, 708 FROM_HERE,
708 base::Bind(&Job::OnStreamReadyCallback, ptr_factory_.GetWeakPtr())); 709 base::Bind(&Job::OnStreamReadyCallback, ptr_factory_.GetWeakPtr()));
709 } 710 }
710 return ERR_IO_PENDING; 711 return ERR_IO_PENDING;
711 712
(...skipping 522 matching lines...) Expand 10 before | Expand all | Expand 10 after
1234 return result; 1235 return result;
1235 } 1236 }
1236 1237
1237 if (using_quic_) { 1238 if (using_quic_) {
1238 if (result < 0) { 1239 if (result < 0) {
1239 job_status_ = STATUS_BROKEN; 1240 job_status_ = STATUS_BROKEN;
1240 MaybeMarkAlternativeServiceBroken(); 1241 MaybeMarkAlternativeServiceBroken();
1241 return result; 1242 return result;
1242 } 1243 }
1243 if (stream_type_ == HttpStreamRequest::BIDIRECTIONAL_STREAM) { 1244 if (stream_type_ == HttpStreamRequest::BIDIRECTIONAL_STREAM) {
1244 bidirectional_stream_job_ = quic_request_.CreateBidirectionalStreamJob(); 1245 bidirectional_stream_impl_ =
1245 if (!bidirectional_stream_job_) { 1246 quic_request_.CreateBidirectionalStreamImpl();
1247 if (!bidirectional_stream_impl_) {
1246 // Quic session is closed before stream can be created. 1248 // Quic session is closed before stream can be created.
1247 return ERR_CONNECTION_CLOSED; 1249 return ERR_CONNECTION_CLOSED;
1248 } 1250 }
1249 } else { 1251 } else {
1250 stream_ = quic_request_.CreateStream(); 1252 stream_ = quic_request_.CreateStream();
1251 if (!stream_) { 1253 if (!stream_) {
1252 // Quic session is closed before stream can be created. 1254 // Quic session is closed before stream can be created.
1253 return ERR_CONNECTION_CLOSED; 1255 return ERR_CONNECTION_CLOSED;
1254 } 1256 }
1255 } 1257 }
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
1295 1297
1296 int HttpStreamFactoryImpl::Job::DoWaitingUserAction(int result) { 1298 int HttpStreamFactoryImpl::Job::DoWaitingUserAction(int result) {
1297 // This state indicates that the stream request is in a partially 1299 // This state indicates that the stream request is in a partially
1298 // completed state, and we've called back to the delegate for more 1300 // completed state, and we've called back to the delegate for more
1299 // information. 1301 // information.
1300 1302
1301 // We're always waiting here for the delegate to call us back. 1303 // We're always waiting here for the delegate to call us back.
1302 return ERR_IO_PENDING; 1304 return ERR_IO_PENDING;
1303 } 1305 }
1304 1306
1305 int HttpStreamFactoryImpl::Job::SetSpdyHttpStreamOrBidirectionalStreamJob( 1307 int HttpStreamFactoryImpl::Job::SetSpdyHttpStreamOrBidirectionalStreamImpl(
1306 base::WeakPtr<SpdySession> session, 1308 base::WeakPtr<SpdySession> session,
1307 bool direct) { 1309 bool direct) {
1308 // TODO(ricea): Restore the code for WebSockets over SPDY once it's 1310 // TODO(ricea): Restore the code for WebSockets over SPDY once it's
1309 // implemented. 1311 // implemented.
1310 if (stream_factory_->for_websockets_) 1312 if (stream_factory_->for_websockets_)
1311 return ERR_NOT_IMPLEMENTED; 1313 return ERR_NOT_IMPLEMENTED;
1312 if (stream_type_ == HttpStreamRequest::BIDIRECTIONAL_STREAM) { 1314 if (stream_type_ == HttpStreamRequest::BIDIRECTIONAL_STREAM) {
1313 bidirectional_stream_job_.reset(new BidirectionalStreamSpdyJob(session)); 1315 bidirectional_stream_impl_.reset(new BidirectionalStreamSpdyImpl(session));
1314 return OK; 1316 return OK;
1315 } 1317 }
1316 1318
1317 // TODO(willchan): Delete this code, because eventually, the 1319 // TODO(willchan): Delete this code, because eventually, the
1318 // HttpStreamFactoryImpl will be creating all the SpdyHttpStreams, since it 1320 // HttpStreamFactoryImpl will be creating all the SpdyHttpStreams, since it
1319 // will know when SpdySessions become available. 1321 // will know when SpdySessions become available.
1320 1322
1321 bool use_relative_url = direct || request_info_.url.SchemeIs("https"); 1323 bool use_relative_url = direct || request_info_.url.SchemeIs("https");
1322 stream_.reset(new SpdyHttpStream(session, use_relative_url)); 1324 stream_.reset(new SpdyHttpStream(session, use_relative_url));
1323 return OK; 1325 return OK;
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
1366 1368
1367 CHECK(!stream_.get()); 1369 CHECK(!stream_.get());
1368 1370
1369 bool direct = !IsHttpsProxyAndHttpUrl(); 1371 bool direct = !IsHttpsProxyAndHttpUrl();
1370 if (existing_spdy_session_.get()) { 1372 if (existing_spdy_session_.get()) {
1371 // We picked up an existing session, so we don't need our socket. 1373 // We picked up an existing session, so we don't need our socket.
1372 if (connection_->socket()) 1374 if (connection_->socket())
1373 connection_->socket()->Disconnect(); 1375 connection_->socket()->Disconnect();
1374 connection_->Reset(); 1376 connection_->Reset();
1375 1377
1376 int set_result = SetSpdyHttpStreamOrBidirectionalStreamJob( 1378 int set_result = SetSpdyHttpStreamOrBidirectionalStreamImpl(
1377 existing_spdy_session_, direct); 1379 existing_spdy_session_, direct);
1378 existing_spdy_session_.reset(); 1380 existing_spdy_session_.reset();
1379 return set_result; 1381 return set_result;
1380 } 1382 }
1381 1383
1382 SpdySessionKey spdy_session_key = GetSpdySessionKey(); 1384 SpdySessionKey spdy_session_key = GetSpdySessionKey();
1383 base::WeakPtr<SpdySession> spdy_session; 1385 base::WeakPtr<SpdySession> spdy_session;
1384 int result = valid_spdy_session_pool_->FindAvailableSession( 1386 int result = valid_spdy_session_pool_->FindAvailableSession(
1385 spdy_session_key, net_log_, &spdy_session); 1387 spdy_session_key, net_log_, &spdy_session);
1386 if (result != OK) { 1388 if (result != OK) {
1387 return result; 1389 return result;
1388 } 1390 }
1389 if (spdy_session) { 1391 if (spdy_session) {
1390 return SetSpdyHttpStreamOrBidirectionalStreamJob(spdy_session, direct); 1392 return SetSpdyHttpStreamOrBidirectionalStreamImpl(spdy_session, direct);
1391 } 1393 }
1392 1394
1393 result = valid_spdy_session_pool_->CreateAvailableSessionFromSocket( 1395 result = valid_spdy_session_pool_->CreateAvailableSessionFromSocket(
1394 spdy_session_key, std::move(connection_), net_log_, 1396 spdy_session_key, std::move(connection_), net_log_,
1395 spdy_certificate_error_, using_ssl_, &spdy_session); 1397 spdy_certificate_error_, using_ssl_, &spdy_session);
1396 if (result != OK) { 1398 if (result != OK) {
1397 return result; 1399 return result;
1398 } 1400 }
1399 1401
1400 if (!spdy_session->HasAcceptableTransportSecurity()) { 1402 if (!spdy_session->HasAcceptableTransportSecurity()) {
(...skipping 14 matching lines...) Expand all
1415 } 1417 }
1416 1418
1417 new_spdy_session_ = spdy_session; 1419 new_spdy_session_ = spdy_session;
1418 spdy_session_direct_ = direct; 1420 spdy_session_direct_ = direct;
1419 const HostPortPair& host_port_pair = spdy_session_key.host_port_pair(); 1421 const HostPortPair& host_port_pair = spdy_session_key.host_port_pair();
1420 base::WeakPtr<HttpServerProperties> http_server_properties = 1422 base::WeakPtr<HttpServerProperties> http_server_properties =
1421 session_->http_server_properties(); 1423 session_->http_server_properties();
1422 if (http_server_properties) 1424 if (http_server_properties)
1423 http_server_properties->SetSupportsSpdy(host_port_pair, true); 1425 http_server_properties->SetSupportsSpdy(host_port_pair, true);
1424 1426
1425 // Create a SpdyHttpStream or a BidirectionalStreamJob attached to the 1427 // Create a SpdyHttpStream or a BidirectionalStreamImpl attached to the
1426 // session; OnNewSpdySessionReadyCallback is not called until an event loop 1428 // session; OnNewSpdySessionReadyCallback is not called until an event loop
1427 // iteration later, so if the SpdySession is closed between then, allow 1429 // iteration later, so if the SpdySession is closed between then, allow
1428 // reuse state from the underlying socket, sampled by SpdyHttpStream, 1430 // reuse state from the underlying socket, sampled by SpdyHttpStream,
1429 // bubble up to the request. 1431 // bubble up to the request.
1430 return SetSpdyHttpStreamOrBidirectionalStreamJob(new_spdy_session_, 1432 return SetSpdyHttpStreamOrBidirectionalStreamImpl(new_spdy_session_,
1431 spdy_session_direct_); 1433 spdy_session_direct_);
1432 } 1434 }
1433 1435
1434 int HttpStreamFactoryImpl::Job::DoCreateStreamComplete(int result) { 1436 int HttpStreamFactoryImpl::Job::DoCreateStreamComplete(int result) {
1435 if (result < 0) 1437 if (result < 0)
1436 return result; 1438 return result;
1437 1439
1438 session_->proxy_service()->ReportSuccess(proxy_info_, 1440 session_->proxy_service()->ReportSuccess(proxy_info_,
1439 session_->params().proxy_delegate); 1441 session_->params().proxy_delegate);
1440 next_state_ = STATE_NONE; 1442 next_state_ = STATE_NONE;
1441 return OK; 1443 return OK;
(...skipping 349 matching lines...) Expand 10 before | Expand all | Expand 10 after
1791 if (connection_->socket()) { 1793 if (connection_->socket()) {
1792 ConnectionAttempts socket_attempts; 1794 ConnectionAttempts socket_attempts;
1793 connection_->socket()->GetConnectionAttempts(&socket_attempts); 1795 connection_->socket()->GetConnectionAttempts(&socket_attempts);
1794 request_->AddConnectionAttempts(socket_attempts); 1796 request_->AddConnectionAttempts(socket_attempts);
1795 } else { 1797 } else {
1796 request_->AddConnectionAttempts(connection_->connection_attempts()); 1798 request_->AddConnectionAttempts(connection_->connection_attempts());
1797 } 1799 }
1798 } 1800 }
1799 1801
1800 } // namespace net 1802 } // namespace net
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698