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

Unified Diff: net/quic/quic_sent_entropy_manager.cc

Issue 469383004: Re-add the QUIC DCHECK to ensure packets are always sent in the order of (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@optimize_HasCryptoHandshake_73125935
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
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,
« net/base/linked_hash_map.h ('K') | « net/quic/congestion_control/tcp_cubic_sender.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698