Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(279)

Unified Diff: net/quic/quic_sent_packet_manager.cc

Issue 490263003: When talking >=QUIC_VERSION_22, regularly send updated bandwidth (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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();
}

Powered by Google App Engine
This is Rietveld 408576698