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

Unified Diff: net/quic/quic_sent_packet_manager.cc

Issue 110383006: QuicSentPacketManager cleanup to simplify OnAbandonFECTimeout() and (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years 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 a71943e192d255618d07f890ff93de26aa939015..770d6ca2d09e6d76518f6256b409a5e0da101b96 100644
--- a/net/quic/quic_sent_packet_manager.cc
+++ b/net/quic/quic_sent_packet_manager.cc
@@ -601,14 +601,14 @@ QuicTime QuicSentPacketManager::OnAbandonFecTimeout() {
QuicTime::Delta retransmission_delay = GetRetransmissionDelay();
QuicTime max_send_time =
clock_->ApproximateNow().Subtract(retransmission_delay);
- while (HasUnackedFecPackets()) {
- QuicPacketSequenceNumber oldest_unacked_fec = GetLeastUnackedFecPacket();
- QuicTime fec_sent_time = GetFecSentTime(oldest_unacked_fec);
+ while (!unacked_fec_packets_.empty()) {
+ UnackedFecPacketMap::iterator it = unacked_fec_packets_.begin();
+ QuicTime fec_sent_time = it->second;
if (fec_sent_time > max_send_time) {
return fec_sent_time.Add(retransmission_delay);
}
- DiscardFecPacket(oldest_unacked_fec);
- OnPacketAbandoned(oldest_unacked_fec);
+ OnPacketAbandoned(it->first);
+ unacked_fec_packets_.erase(it++);
}
return QuicTime::Zero();
@@ -751,10 +751,6 @@ QuicTime::Delta QuicSentPacketManager::TimeUntilSend(
handshake);
}
-const QuicTime::Delta QuicSentPacketManager::DefaultRetransmissionTime() {
- return QuicTime::Delta::FromMilliseconds(kDefaultRetransmissionTimeMs);
-}
-
// Ensures that the Delayed Ack timer is always set to a value lesser
// than the retransmission timer's minimum value (MinRTO). We want the
// delayed ack to get back to the QUIC peer before the sender's
« 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