Chromium Code Reviews| Index: net/http/http_stream_factory_impl.cc |
| diff --git a/net/http/http_stream_factory_impl.cc b/net/http/http_stream_factory_impl.cc |
| index 577a990853ae6ac0e4d83987152c46b7873ee019..e64c170a0f8ebc523c3e31d735ef39cdfb48a6cd 100644 |
| --- a/net/http/http_stream_factory_impl.cc |
| +++ b/net/http/http_stream_factory_impl.cc |
| @@ -94,7 +94,10 @@ HttpStreamFactoryImpl::HttpStreamFactoryImpl(HttpNetworkSession* session, |
| bool for_websockets) |
| : session_(session), |
| job_factory_(new DefaultJobFactory()), |
| - for_websockets_(for_websockets) {} |
| + for_websockets_(for_websockets), |
| + factory_net_log_( |
| + NetLogWithSource::Make(session->net_log(), |
| + NetLogSourceType::HTTP_STREAM_FACTORY)) {} |
|
mmenke
2017/01/12 16:35:08
This isn't really how sources are currently used -
xunjieli
2017/01/12 18:09:42
My main motivation for creating a long-lived event
|
| HttpStreamFactoryImpl::~HttpStreamFactoryImpl() { |
| DCHECK(request_map_.empty()); |
| @@ -155,11 +158,12 @@ HttpStreamRequest* HttpStreamFactoryImpl::RequestStreamInternal( |
| HttpStreamRequest::StreamType stream_type, |
| const NetLogWithSource& net_log) { |
| JobController* job_controller = |
| - new JobController(this, delegate, session_, job_factory_.get()); |
| + new JobController(this, delegate, session_, job_factory_.get(), |
| + /*is_preconnect=*/false, net_log); |
| job_controller_set_.insert(base::WrapUnique(job_controller)); |
| Request* request = job_controller->Start( |
| - request_info, delegate, websocket_handshake_stream_create_helper, net_log, |
| + request_info, delegate, websocket_handshake_stream_create_helper, |
| stream_type, priority, server_ssl_config, proxy_ssl_config); |
| return request; |
| @@ -178,7 +182,8 @@ void HttpStreamFactoryImpl::PreconnectStreams( |
| DCHECK(!for_websockets_); |
| JobController* job_controller = |
| - new JobController(this, nullptr, session_, job_factory_.get()); |
| + new JobController(this, nullptr, session_, job_factory_.get(), |
| + /*is_preconnect=*/true, factory_net_log_); |
| job_controller_set_.insert(base::WrapUnique(job_controller)); |
| job_controller->Preconnect(num_streams, request_info, server_ssl_config, |
| proxy_ssl_config); |
| @@ -195,8 +200,7 @@ void HttpStreamFactoryImpl::OnNewSpdySessionReady( |
| const ProxyInfo& used_proxy_info, |
| bool was_alpn_negotiated, |
| NextProto negotiated_protocol, |
| - bool using_spdy, |
| - const NetLogWithSource& net_log) { |
| + bool using_spdy) { |
| while (true) { |
| if (!spdy_session) |
| break; |