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

Unified Diff: net/quic/quic_sent_packet_manager.cc

Issue 493183002: Move least_packet_awaited_by_peer_ from QuicReceivedPacketManager to (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@Remove_timestamp_receiver_73627146
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
« no previous file with comments | « net/quic/quic_sent_packet_manager.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 171f6e2eac353ad0743d9a30a0fd518eaf1a54cf..ffdea9bc449eba38e33bb3cfe8b945aead0bcd3e 100644
--- a/net/quic/quic_sent_packet_manager.cc
+++ b/net/quic/quic_sent_packet_manager.cc
@@ -79,6 +79,7 @@ QuicSentPacketManager::QuicSentPacketManager(
stats)),
loss_algorithm_(LossDetectionInterface::Create(loss_type)),
largest_observed_(0),
+ least_packet_awaited_by_peer_(1),
first_rto_transmission_(0),
consecutive_rto_count_(0),
consecutive_tlp_count_(0),
@@ -179,6 +180,7 @@ void QuicSentPacketManager::OnIncomingAck(const QuicAckFrame& ack_frame,
QuicTime ack_receive_time) {
QuicByteCount bytes_in_flight = unacked_packets_.bytes_in_flight();
+ UpdatePacketInformationReceivedByPeer(ack_frame);
// We rely on delta_time_largest_observed to compute an RTT estimate, so
// we only update rtt when the largest observed gets acked.
bool largest_observed_acked = MaybeUpdateRTT(ack_frame, ack_receive_time);
@@ -223,6 +225,15 @@ void QuicSentPacketManager::OnIncomingAck(const QuicAckFrame& ack_frame,
}
}
+void QuicSentPacketManager::UpdatePacketInformationReceivedByPeer(
+ const QuicAckFrame& ack_frame) {
+ if (ack_frame.missing_packets.empty()) {
+ least_packet_awaited_by_peer_ = ack_frame.largest_observed + 1;
+ } else {
+ least_packet_awaited_by_peer_ = *(ack_frame.missing_packets.begin());
+ }
+}
+
void QuicSentPacketManager::MaybeInvokeCongestionEvent(
bool rtt_updated, QuicByteCount bytes_in_flight) {
if (!rtt_updated && packets_acked_.empty() && packets_lost_.empty()) {
« no previous file with comments | « net/quic/quic_sent_packet_manager.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698