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

Unified Diff: net/quic/test_tools/quic_connection_peer.cc

Issue 479543004: Convert QUIC's SentEntropyManager to use a deque instead of a map in (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@send_updated_bandwidth_estimates_73579021
Patch Set: Created 6 years, 4 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_entropy_manager_test.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/quic/test_tools/quic_connection_peer.cc
diff --git a/net/quic/test_tools/quic_connection_peer.cc b/net/quic/test_tools/quic_connection_peer.cc
index d1aa8a5cca98ee75dbd09e2e0474427feb7c5134..35f5eac12ba1169e613324379b37754748d063cc 100644
--- a/net/quic/test_tools/quic_connection_peer.cc
+++ b/net/quic/test_tools/quic_connection_peer.cc
@@ -107,15 +107,18 @@ bool QuicConnectionPeer::IsRetransmission(
QuicPacketEntropyHash QuicConnectionPeer::GetSentEntropyHash(
QuicConnection* connection,
QuicPacketSequenceNumber sequence_number) {
- return connection->sent_entropy_manager_.EntropyHash(sequence_number);
+ QuicSentEntropyManager::CumulativeEntropy last_entropy_copy =
+ connection->sent_entropy_manager_.last_cumulative_entropy_;
+ connection->sent_entropy_manager_.UpdateCumulativeEntropy(sequence_number,
+ &last_entropy_copy);
+ return last_entropy_copy.entropy;
}
// static
QuicPacketEntropyHash QuicConnectionPeer::PacketEntropy(
QuicConnection* connection,
QuicPacketSequenceNumber sequence_number) {
- return
- connection->sent_entropy_manager_.packets_entropy_[sequence_number].first;
+ return connection->sent_entropy_manager_.GetPacketEntropy(sequence_number);
}
// static
« no previous file with comments | « net/quic/quic_sent_entropy_manager_test.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698