| 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 <string> | 7 #include <string> |
| 8 #include <utility> | 8 #include <utility> |
| 9 | 9 |
| 10 #include "base/bind.h" | 10 #include "base/bind.h" |
| (...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 113 FROM_HERE, | 113 FROM_HERE, |
| 114 base::Bind(&BidirectionalStream::NotifyFailed, | 114 base::Bind(&BidirectionalStream::NotifyFailed, |
| 115 weak_factory_.GetWeakPtr(), ERR_DISALLOWED_URL_SCHEME)); | 115 weak_factory_.GetWeakPtr(), ERR_DISALLOWED_URL_SCHEME)); |
| 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_ = | 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, | 126 server_ssl_config, this, |
| 127 /* enable_ip_based_pooling = */ true, | 127 /* enable_ip_based_pooling = */ true, |
| 128 /* enable_alternative_services = */ true, net_log_); | 128 /* enable_alternative_services = */ true, net_log_)); |
| 129 // Check that this call cannot fail to set a non-NULL |stream_request_|. | 129 // Check that this call cannot fail to set a non-NULL |stream_request_|. |
| 130 DCHECK(stream_request_); | 130 DCHECK(stream_request_); |
| 131 // Check that HttpStreamFactory does not invoke OnBidirectionalStreamImplReady | 131 // Check that HttpStreamFactory does not invoke OnBidirectionalStreamImplReady |
| 132 // synchronously. | 132 // synchronously. |
| 133 DCHECK(!stream_impl_); | 133 DCHECK(!stream_impl_); |
| 134 } | 134 } |
| 135 | 135 |
| 136 BidirectionalStream::~BidirectionalStream() { | 136 BidirectionalStream::~BidirectionalStream() { |
| 137 UpdateHistograms(); | 137 UpdateHistograms(); |
| 138 if (net_log_.IsCapturing()) { | 138 if (net_log_.IsCapturing()) { |
| (...skipping 303 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 442 "Net.BidirectionalStream.TimeToSendEnd.QUIC", | 442 "Net.BidirectionalStream.TimeToSendEnd.QUIC", |
| 443 load_timing_info_.send_end - load_timing_info_.request_start); | 443 load_timing_info_.send_end - load_timing_info_.request_start); |
| 444 UMA_HISTOGRAM_COUNTS("Net.BidirectionalStream.ReceivedBytes.QUIC", | 444 UMA_HISTOGRAM_COUNTS("Net.BidirectionalStream.ReceivedBytes.QUIC", |
| 445 stream_impl_->GetTotalReceivedBytes()); | 445 stream_impl_->GetTotalReceivedBytes()); |
| 446 UMA_HISTOGRAM_COUNTS("Net.BidirectionalStream.SentBytes.QUIC", | 446 UMA_HISTOGRAM_COUNTS("Net.BidirectionalStream.SentBytes.QUIC", |
| 447 stream_impl_->GetTotalSentBytes()); | 447 stream_impl_->GetTotalSentBytes()); |
| 448 } | 448 } |
| 449 } | 449 } |
| 450 | 450 |
| 451 } // namespace net | 451 } // namespace net |
| OLD | NEW |