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

Unified Diff: net/quic/quic_sent_packet_manager.cc

Issue 530343003: Landing Recent QUIC Changes. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@Final_0828
Patch Set: Created 6 years, 3 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') | net/quic/quic_sent_packet_manager_test.cc » ('j') | 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 c592e133a2c99892ae72119de8fe85efd0185618..a5b1a9d4b71eb2f9525fa0e5c84e7e127f7634fd 100644
--- a/net/quic/quic_sent_packet_manager.cc
+++ b/net/quic/quic_sent_packet_manager.cc
@@ -228,7 +228,7 @@ void QuicSentPacketManager::OnIncomingAck(const QuicAckFrame& ack_frame,
ack_receive_time,
unacked_packets_.largest_observed(),
largest_observed_acked,
- GetLeastUnackedSentPacket());
+ GetLeastUnacked());
}
}
@@ -270,6 +270,10 @@ void QuicSentPacketManager::HandleAckForSentPackets(
}
if (ContainsKey(ack_frame.missing_packets, sequence_number)) {
+ // Don't continue to increase the nack count for packets not in flight.
+ if (!it->in_flight) {
+ continue;
+ }
// Consider it multiple nacks when there is a gap between the missing
// packet and the largest observed, since the purpose of a nack
// threshold is to tolerate re-ordering. This handles both StretchAcks
@@ -288,7 +292,7 @@ void QuicSentPacketManager::HandleAckForSentPackets(
// If data is associated with the most recent transmission of this
// packet, then inform the caller.
if (it->in_flight) {
- packets_acked_[sequence_number] = *it;
+ packets_acked_.push_back(make_pair(sequence_number, *it));
}
MarkPacketHandled(sequence_number, *it, delta_largest_observed);
}
@@ -494,7 +498,7 @@ bool QuicSentPacketManager::HasUnackedPackets() const {
}
QuicPacketSequenceNumber
-QuicSentPacketManager::GetLeastUnackedSentPacket() const {
+QuicSentPacketManager::GetLeastUnacked() const {
return unacked_packets_.GetLeastUnacked();
}
@@ -689,7 +693,7 @@ void QuicSentPacketManager::InvokeLossDetection(QuicTime time) {
// should be recorded as a loss to the send algorithm, but not retransmitted
// until it's known whether the FEC packet arrived.
++stats_->packets_lost;
- packets_lost_[sequence_number] = transmission_info;
+ packets_lost_.push_back(make_pair(sequence_number, transmission_info));
DVLOG(1) << ENDPOINT << "Lost packet " << sequence_number;
if (transmission_info.retransmittable_frames != NULL) {
« no previous file with comments | « net/quic/quic_sent_packet_manager.h ('k') | net/quic/quic_sent_packet_manager_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698