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

Unified Diff: net/quic/quic_received_packet_manager.cc

Issue 1421853006: Landing Recent QUIC changes until: Fri Oct 30 22:23:58 2015 +0000 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix comments Created 5 years, 1 month 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_protocol.cc ('k') | net/quic/quic_received_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_received_packet_manager.cc
diff --git a/net/quic/quic_received_packet_manager.cc b/net/quic/quic_received_packet_manager.cc
index f49391c20cea08632b016845186130fbc3852c7b..98cc86b181f512bbdfbd6c303c1e8db13b6fa2c0 100644
--- a/net/quic/quic_received_packet_manager.cc
+++ b/net/quic/quic_received_packet_manager.cc
@@ -179,13 +179,15 @@ void QuicReceivedPacketManager::RecordPacketReceived(
ack_frame_.received_packet_times.push_back(
std::make_pair(packet_number, receipt_time));
- ack_frame_.revived_packets.erase(packet_number);
+ if (ack_frame_.latest_revived_packet == packet_number) {
+ ack_frame_.latest_revived_packet = 0;
+ }
}
void QuicReceivedPacketManager::RecordPacketRevived(
QuicPacketNumber packet_number) {
LOG_IF(DFATAL, !IsAwaitingPacket(packet_number));
- ack_frame_.revived_packets.insert(packet_number);
+ ack_frame_.latest_revived_packet = packet_number;
}
bool QuicReceivedPacketManager::IsMissing(QuicPacketNumber packet_number) {
@@ -253,9 +255,9 @@ QuicPacketEntropyHash QuicReceivedPacketManager::EntropyHash(
bool QuicReceivedPacketManager::DontWaitForPacketsBefore(
QuicPacketNumber least_unacked) {
- ack_frame_.revived_packets.erase(
- ack_frame_.revived_packets.begin(),
- ack_frame_.revived_packets.lower_bound(least_unacked));
+ if (ack_frame_.latest_revived_packet < least_unacked) {
+ ack_frame_.latest_revived_packet = 0;
+ }
return ack_frame_.missing_packets.RemoveUpTo(least_unacked);
}
« no previous file with comments | « net/quic/quic_protocol.cc ('k') | net/quic/quic_received_packet_manager_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698