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

Unified Diff: net/quic/congestion_control/send_algorithm_simulator.cc

Issue 530343003: Landing Recent QUIC Changes. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@Final_0828
Patch Set: Created 6 years, 3 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
Index: net/quic/congestion_control/send_algorithm_simulator.cc
diff --git a/net/quic/congestion_control/send_algorithm_simulator.cc b/net/quic/congestion_control/send_algorithm_simulator.cc
index 33f6ba009f489f5eaa3f380d6466f55a9ea27476..3864a747e7da14afcba3c564f8d0e98d8be07722 100644
--- a/net/quic/congestion_control/send_algorithm_simulator.cc
+++ b/net/quic/congestion_control/send_algorithm_simulator.cc
@@ -11,6 +11,7 @@
#include "net/quic/crypto/quic_random.h"
using std::list;
+using std::make_pair;
using std::max;
using std::min;
using std::vector;
@@ -244,8 +245,8 @@ bool SendAlgorithmSimulator::HasRecentLostPackets(
void SendAlgorithmSimulator::HandlePendingAck(Transfer* transfer) {
Sender* sender = transfer->sender;
DCHECK_LT(sender->last_acked, sender->next_acked);
- SendAlgorithmInterface::CongestionMap acked_packets;
- SendAlgorithmInterface::CongestionMap lost_packets;
+ SendAlgorithmInterface::CongestionVector acked_packets;
+ SendAlgorithmInterface::CongestionVector lost_packets;
DVLOG(1) << "Acking packets from:" << sender->last_acked
<< " to " << sender->next_acked
<< " bytes_in_flight:" << transfer->bytes_in_flight
@@ -268,13 +269,13 @@ void SendAlgorithmSimulator::HandlePendingAck(Transfer* transfer) {
if (it->sequence_number > sender->last_acked) {
DVLOG(1) << "Lost packet:" << sender->last_acked
<< " dropped by buffer overflow.";
- lost_packets[sender->last_acked] = info;
+ lost_packets.push_back(make_pair(sender->last_acked, info));
continue;
}
if (it->lost) {
- lost_packets[sender->last_acked] = info;
+ lost_packets.push_back(make_pair(sender->last_acked, info));
} else {
- acked_packets[sender->last_acked] = info;
+ acked_packets.push_back(make_pair(sender->last_acked, info));
}
// This packet has been acked or lost, remove it from sent_packets_.
largest_observed = *it;
« no previous file with comments | « net/quic/congestion_control/send_algorithm_interface.h ('k') | net/quic/congestion_control/tcp_cubic_sender.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698