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

Unified Diff: net/quic/quic_sent_packet_manager.cc

Issue 25443002: Land Recent QUIC changes. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix to change SendAlarm crash Created 7 years, 2 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/test_tools/quic_connection_peer.h » ('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 b31899b8a57587c1ebe6d27623d9d1a7e3785087..a9f26b88d74debc77ece3e5a75d5cd3ea8534626 100644
--- a/net/quic/quic_sent_packet_manager.cc
+++ b/net/quic/quic_sent_packet_manager.cc
@@ -6,6 +6,7 @@
#include "base/logging.h"
#include "base/stl_util.h"
+#include "net/quic/quic_ack_notifier_manager.h"
using std::make_pair;
@@ -58,6 +59,8 @@ void QuicSentPacketManager::OnSerializedPacket(
return;
}
+ ack_notifier_manager_.OnSerializedPacket(serialized_packet);
+
DCHECK(unacked_packets_.empty() ||
unacked_packets_.rbegin()->first <
serialized_packet.sequence_number);
@@ -88,6 +91,12 @@ void QuicSentPacketManager::OnRetransmittedPacket(
RetransmittableFrames* frames = unacked_packets_[old_sequence_number];
DCHECK(frames);
+
+ // A notifier may be waiting to hear about ACKs for the original sequence
+ // number. Inform them that the sequence number has changed.
+ ack_notifier_manager_.UpdateSequenceNumber(old_sequence_number,
+ new_sequence_number);
+
if (FLAGS_track_retransmission_history) {
// We keep the old packet in the unacked packet list until it, or one of
// the retransmissions of it are acked.
@@ -126,6 +135,11 @@ void QuicSentPacketManager::OnIncomingAck(
SequenceNumberSet* acked_packets) {
HandleAckForSentPackets(received_info, is_truncated_ack, acked_packets);
HandleAckForSentFecPackets(received_info, acked_packets);
+
+ if (acked_packets->size() > 0) {
+ // The AckNotifierManager should be informed of every ACKed sequence number.
+ ack_notifier_manager_.OnIncomingAck(*acked_packets);
+ }
}
void QuicSentPacketManager::DiscardUnackedPacket(
« no previous file with comments | « net/quic/quic_sent_packet_manager.h ('k') | net/quic/test_tools/quic_connection_peer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698