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

Unified Diff: net/quic/quic_ack_notifier_manager.cc

Issue 867033002: Replace the map in QuicAckNotifier with a counter. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@Change_AckNotifier_datastructures_84156430
Patch Set: Created 5 years, 11 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_ack_notifier_manager.h ('k') | net/quic/quic_ack_notifier_test.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/quic/quic_ack_notifier_manager.cc
diff --git a/net/quic/quic_ack_notifier_manager.cc b/net/quic/quic_ack_notifier_manager.cc
index 39db3f2fe48e4a990b336061fbd90390630b9114..0d37752e211ab130f4ffcb9243ecf486e8f9ec1d 100644
--- a/net/quic/quic_ack_notifier_manager.cc
+++ b/net/quic/quic_ack_notifier_manager.cc
@@ -50,9 +50,10 @@ void AckNotifierManager::OnPacketAcked(QuicPacketSequenceNumber sequence_number,
ack_notifier_map_.erase(map_it);
}
-void AckNotifierManager::UpdateSequenceNumber(
+void AckNotifierManager::OnPacketRetransmitted(
QuicPacketSequenceNumber old_sequence_number,
- QuicPacketSequenceNumber new_sequence_number) {
+ QuicPacketSequenceNumber new_sequence_number,
+ int packet_payload_size) {
auto map_it = ack_notifier_map_.find(old_sequence_number);
if (map_it == ack_notifier_map_.end()) {
// No AckNotifiers are interested in the old sequence number.
@@ -62,8 +63,7 @@ void AckNotifierManager::UpdateSequenceNumber(
// Update the existing QuicAckNotifiers to the new sequence number.
AckNotifierList& ack_notifier_list = map_it->second;
for (QuicAckNotifier* ack_notifier : ack_notifier_list) {
- ack_notifier->UpdateSequenceNumber(old_sequence_number,
- new_sequence_number);
+ ack_notifier->OnPacketRetransmitted(packet_payload_size);
}
// The old sequence number is no longer of interest, copy the updated
« no previous file with comments | « net/quic/quic_ack_notifier_manager.h ('k') | net/quic/quic_ack_notifier_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698