| 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 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 74 delegate, | 74 delegate, |
| 75 base::MakeUnique<base::Timer>(false, false)) {} | 75 base::MakeUnique<base::Timer>(false, false)) {} |
| 76 | 76 |
| 77 BidirectionalStream::BidirectionalStream( | 77 BidirectionalStream::BidirectionalStream( |
| 78 std::unique_ptr<BidirectionalStreamRequestInfo> request_info, | 78 std::unique_ptr<BidirectionalStreamRequestInfo> request_info, |
| 79 HttpNetworkSession* session, | 79 HttpNetworkSession* session, |
| 80 bool send_request_headers_automatically, | 80 bool send_request_headers_automatically, |
| 81 Delegate* delegate, | 81 Delegate* delegate, |
| 82 std::unique_ptr<base::Timer> timer) | 82 std::unique_ptr<base::Timer> timer) |
| 83 : request_info_(std::move(request_info)), | 83 : request_info_(std::move(request_info)), |
| 84 net_log_(BoundNetLog::Make(session->net_log(), | 84 net_log_(NetLogWithSource::Make(session->net_log(), |
| 85 NetLogSourceType::BIDIRECTIONAL_STREAM)), | 85 NetLogSourceType::BIDIRECTIONAL_STREAM)), |
| 86 session_(session), | 86 session_(session), |
| 87 send_request_headers_automatically_(send_request_headers_automatically), | 87 send_request_headers_automatically_(send_request_headers_automatically), |
| 88 request_headers_sent_(false), | 88 request_headers_sent_(false), |
| 89 delegate_(delegate), | 89 delegate_(delegate), |
| 90 timer_(std::move(timer)), | 90 timer_(std::move(timer)), |
| 91 weak_factory_(this) { | 91 weak_factory_(this) { |
| 92 DCHECK(delegate_); | 92 DCHECK(delegate_); |
| 93 DCHECK(request_info_); | 93 DCHECK(request_info_); |
| 94 | 94 |
| 95 if (net_log_.IsCapturing()) { | 95 if (net_log_.IsCapturing()) { |
| (...skipping 319 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 415 UMA_HISTOGRAM_TIMES("Net.BidirectionalStream.TimeToSendEnd.QUIC", | 415 UMA_HISTOGRAM_TIMES("Net.BidirectionalStream.TimeToSendEnd.QUIC", |
| 416 send_end_time_ - start_time_); | 416 send_end_time_ - start_time_); |
| 417 UMA_HISTOGRAM_COUNTS("Net.BidirectionalStream.ReceivedBytes.QUIC", | 417 UMA_HISTOGRAM_COUNTS("Net.BidirectionalStream.ReceivedBytes.QUIC", |
| 418 stream_impl_->GetTotalReceivedBytes()); | 418 stream_impl_->GetTotalReceivedBytes()); |
| 419 UMA_HISTOGRAM_COUNTS("Net.BidirectionalStream.SentBytes.QUIC", | 419 UMA_HISTOGRAM_COUNTS("Net.BidirectionalStream.SentBytes.QUIC", |
| 420 stream_impl_->GetTotalSentBytes()); | 420 stream_impl_->GetTotalSentBytes()); |
| 421 } | 421 } |
| 422 } | 422 } |
| 423 | 423 |
| 424 } // namespace net | 424 } // namespace net |
| OLD | NEW |