Index: net/quic/quic_sent_packet_manager.cc |
diff --git a/net/quic/quic_sent_packet_manager.cc b/net/quic/quic_sent_packet_manager.cc |
index 089b301d8b60c5cd1072b1bb22aa43a99972c00b..171f6e2eac353ad0743d9a30a0fd518eaf1a54cf 100644 |
--- a/net/quic/quic_sent_packet_manager.cc |
+++ b/net/quic/quic_sent_packet_manager.cc |
@@ -190,6 +190,14 @@ void QuicSentPacketManager::OnIncomingAck(const QuicAckFrame& ack_frame, |
InvokeLossDetection(ack_receive_time); |
MaybeInvokeCongestionEvent(largest_observed_acked, bytes_in_flight); |
+ sustained_bandwidth_recorder_.RecordEstimate( |
+ send_algorithm_->InRecovery(), |
+ send_algorithm_->InSlowStart(), |
+ send_algorithm_->BandwidthEstimate(), |
+ ack_receive_time, |
+ clock_->WallNow(), |
+ rtt_stats_.SmoothedRtt()); |
+ |
// If we have received a truncated ack, then we need to clear out some |
// previous transmissions to allow the peer to actually ACK new packets. |
if (ack_frame.is_truncated) { |
@@ -851,6 +859,11 @@ bool QuicSentPacketManager::HasReliableBandwidthEstimate() const { |
return send_algorithm_->HasReliableBandwidthEstimate(); |
} |
+const QuicSustainedBandwidthRecorder& |
+QuicSentPacketManager::SustainedBandwidthRecorder() const { |
+ return sustained_bandwidth_recorder_; |
+} |
+ |
QuicByteCount QuicSentPacketManager::GetCongestionWindow() const { |
return send_algorithm_->GetCongestionWindow(); |
} |