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

Unified Diff: net/quic/quic_sent_entropy_manager_test.cc

Issue 1330973002: relnote: Refactor QuicAckFrame::missing_packets to support a change to a (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@Tidy_up_DLOG_messages_101773586
Patch Set: Created 5 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/quic_sent_entropy_manager_test.cc
diff --git a/net/quic/quic_sent_entropy_manager_test.cc b/net/quic/quic_sent_entropy_manager_test.cc
index 8a7b3460353aefde6d31b787e91c21923497ddaa..cb52531c80ec72338925e5750715500d2b8c1260 100644
--- a/net/quic/quic_sent_entropy_manager_test.cc
+++ b/net/quic/quic_sent_entropy_manager_test.cc
@@ -43,15 +43,14 @@ TEST_F(QuicSentEntropyManagerTest, IsValidEntropy) {
entropy_manager_.RecordPacketEntropyHash(i + 1, entropies[i]);
}
- PacketNumberSet missing_packets;
- missing_packets.insert(1);
- missing_packets.insert(4);
- missing_packets.insert(7);
- missing_packets.insert(8);
+ PacketNumberQueue missing_packets;
+ missing_packets.Add(1);
+ missing_packets.Add(4);
+ missing_packets.Add(7, 9);
QuicPacketEntropyHash entropy_hash = 0;
for (size_t i = 0; i < arraysize(entropies); ++i) {
- if (missing_packets.find(i + 1) == missing_packets.end()) {
+ if (!missing_packets.Contains(i + 1)) {
entropy_hash ^= entropies[i];
}
}
@@ -72,13 +71,12 @@ TEST_F(QuicSentEntropyManagerTest, ClearEntropiesBefore) {
// still return correct results.
entropy_manager_.ClearEntropyBefore(5);
- PacketNumberSet missing_packets;
- missing_packets.insert(7);
- missing_packets.insert(8);
+ PacketNumberQueue missing_packets;
+ missing_packets.Add(7, 9);
QuicPacketEntropyHash entropy_hash = 0;
for (size_t i = 0; i < arraysize(entropies); ++i) {
- if (missing_packets.find(i + 1) == missing_packets.end()) {
+ if (!missing_packets.Contains(i + 1)) {
entropy_hash ^= entropies[i];
}
}

Powered by Google App Engine
This is Rietveld 408576698