| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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/bidirectional_stream.h" | 5 #include "net/http/bidirectional_stream.h" |
| 6 | 6 |
| 7 #include <memory> | 7 #include <memory> |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/bind.h" | 10 #include "base/bind.h" |
| (...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 116 return; | 116 return; |
| 117 } | 117 } |
| 118 | 118 |
| 119 HttpRequestInfo http_request_info; | 119 HttpRequestInfo http_request_info; |
| 120 http_request_info.url = request_info_->url; | 120 http_request_info.url = request_info_->url; |
| 121 http_request_info.method = request_info_->method; | 121 http_request_info.method = request_info_->method; |
| 122 http_request_info.extra_headers = request_info_->extra_headers; | 122 http_request_info.extra_headers = request_info_->extra_headers; |
| 123 stream_request_.reset( | 123 stream_request_.reset( |
| 124 session->http_stream_factory()->RequestBidirectionalStreamImpl( | 124 session->http_stream_factory()->RequestBidirectionalStreamImpl( |
| 125 http_request_info, request_info_->priority, server_ssl_config, | 125 http_request_info, request_info_->priority, server_ssl_config, |
| 126 server_ssl_config, this, net_log_)); | 126 server_ssl_config, this, |
| 127 /* enable_ip_based_pooling = */ true, net_log_)); |
| 127 // Check that this call cannot fail to set a non-NULL |stream_request_|. | 128 // Check that this call cannot fail to set a non-NULL |stream_request_|. |
| 128 DCHECK(stream_request_); | 129 DCHECK(stream_request_); |
| 129 // Check that HttpStreamFactory does not invoke OnBidirectionalStreamImplReady | 130 // Check that HttpStreamFactory does not invoke OnBidirectionalStreamImplReady |
| 130 // synchronously. | 131 // synchronously. |
| 131 DCHECK(!stream_impl_); | 132 DCHECK(!stream_impl_); |
| 132 } | 133 } |
| 133 | 134 |
| 134 BidirectionalStream::~BidirectionalStream() { | 135 BidirectionalStream::~BidirectionalStream() { |
| 135 UpdateHistograms(); | 136 UpdateHistograms(); |
| 136 if (net_log_.IsCapturing()) { | 137 if (net_log_.IsCapturing()) { |
| (...skipping 303 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 440 "Net.BidirectionalStream.TimeToSendEnd.QUIC", | 441 "Net.BidirectionalStream.TimeToSendEnd.QUIC", |
| 441 load_timing_info_.send_end - load_timing_info_.request_start); | 442 load_timing_info_.send_end - load_timing_info_.request_start); |
| 442 UMA_HISTOGRAM_COUNTS("Net.BidirectionalStream.ReceivedBytes.QUIC", | 443 UMA_HISTOGRAM_COUNTS("Net.BidirectionalStream.ReceivedBytes.QUIC", |
| 443 stream_impl_->GetTotalReceivedBytes()); | 444 stream_impl_->GetTotalReceivedBytes()); |
| 444 UMA_HISTOGRAM_COUNTS("Net.BidirectionalStream.SentBytes.QUIC", | 445 UMA_HISTOGRAM_COUNTS("Net.BidirectionalStream.SentBytes.QUIC", |
| 445 stream_impl_->GetTotalSentBytes()); | 446 stream_impl_->GetTotalSentBytes()); |
| 446 } | 447 } |
| 447 } | 448 } |
| 448 | 449 |
| 449 } // namespace net | 450 } // namespace net |
| OLD | NEW |