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

Unified Diff: net/quic/quic_ack_notifier_manager.cc

Issue 870733002: Change some of QUIC's AckNotifier datastructures from maps to hashmaps (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@Add_new_RTO_connection_option_84036848
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_packet_generator.h » ('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 129a951e8940d6daa1d1c975a8582bbd92ccf1b0..39db3f2fe48e4a990b336061fbd90390630b9114 100644
--- a/net/quic/quic_ack_notifier_manager.cc
+++ b/net/quic/quic_ack_notifier_manager.cc
@@ -34,8 +34,8 @@ void AckNotifierManager::OnPacketAcked(QuicPacketSequenceNumber sequence_number,
// One or more AckNotifiers are registered as interested in this sequence
// number. Iterate through them and call OnAck on each.
- AckNotifierSet& ack_notifier_set = map_it->second;
- for (QuicAckNotifier* ack_notifier : ack_notifier_set) {
+ AckNotifierList& ack_notifier_list = map_it->second;
+ for (QuicAckNotifier* ack_notifier : ack_notifier_list) {
ack_notifier->OnAck(sequence_number, delta_largest_observed);
// If this has resulted in an empty AckNotifer, erase it.
@@ -60,15 +60,15 @@ void AckNotifierManager::UpdateSequenceNumber(
}
// Update the existing QuicAckNotifiers to the new sequence number.
- AckNotifierSet& ack_notifier_set = map_it->second;
- for (QuicAckNotifier* ack_notifier : ack_notifier_set) {
+ AckNotifierList& ack_notifier_list = map_it->second;
+ for (QuicAckNotifier* ack_notifier : ack_notifier_list) {
ack_notifier->UpdateSequenceNumber(old_sequence_number,
new_sequence_number);
}
// The old sequence number is no longer of interest, copy the updated
// AckNotifiers to the new sequence number before deleting the old.
- ack_notifier_map_[new_sequence_number] = ack_notifier_set;
+ ack_notifier_map_[new_sequence_number] = ack_notifier_list;
ack_notifier_map_.erase(map_it);
}
@@ -86,7 +86,7 @@ void AckNotifierManager::OnSerializedPacket(
// Update the mapping in the other direction, from sequence number to
// AckNotifier.
- ack_notifier_map_[serialized_packet.sequence_number].insert(notifier);
+ ack_notifier_map_[serialized_packet.sequence_number].push_back(notifier);
// Take ownership of the AckNotifier.
ack_notifiers_.insert(notifier);
@@ -112,7 +112,7 @@ void AckNotifierManager::OnSerializedPacket(
// Update the mapping in the other direction, from sequence number to
// AckNotifier.
- ack_notifier_map_[serialized_packet.sequence_number].insert(notifier);
+ ack_notifier_map_[serialized_packet.sequence_number].push_back(notifier);
// Take ownership of the AckNotifier.
ack_notifiers_.insert(notifier);
« no previous file with comments | « net/quic/quic_ack_notifier_manager.h ('k') | net/quic/quic_packet_generator.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698