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

Unified Diff: net/quic/quic_sent_entropy_manager.cc

Issue 476023002: Land Recent QUIC Changes. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@Final_0814_2
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.h ('k') | net/quic/quic_sent_entropy_manager_test.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/quic/quic_sent_entropy_manager.cc
diff --git a/net/quic/quic_sent_entropy_manager.cc b/net/quic/quic_sent_entropy_manager.cc
index 0f33e2d56e9b26c43a3339e3ee5759d998a53a32..9472a880a52e19e8919d5760d99e292f0ea6b79d 100644
--- a/net/quic/quic_sent_entropy_manager.cc
+++ b/net/quic/quic_sent_entropy_manager.cc
@@ -21,8 +21,12 @@ QuicSentEntropyManager::~QuicSentEntropyManager() {}
void QuicSentEntropyManager::RecordPacketEntropyHash(
QuicPacketSequenceNumber sequence_number,
QuicPacketEntropyHash entropy_hash) {
- // TODO(satyamshekhar): Check this logic again when/if we enable packet
- // reordering.
+ if (!packets_entropy_.empty()) {
+ // Ensure packets always are recorded in order.
+ // Every packet's entropy is recorded, even if it's not sent, so there
+ // are not sequence number gaps.
+ DCHECK_LT(packets_entropy_.back().first, sequence_number);
+ }
packets_entropy_hash_ ^= entropy_hash;
packets_entropy_.insert(
make_pair(sequence_number,
« no previous file with comments | « net/quic/quic_sent_entropy_manager.h ('k') | net/quic/quic_sent_entropy_manager_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698