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

Side by Side Diff: net/quic/quic_sent_entropy_manager.h

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 unified diff | Download patch
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 // 4 //
5 // Manages the packet entropy calculation for both sent and received packets 5 // Manages the packet entropy calculation for both sent and received packets
6 // for a connection. 6 // for a connection.
7 7
8 #ifndef NET_QUIC_QUIC_SENT_ENTROPY_MANAGER_H_ 8 #ifndef NET_QUIC_QUIC_SENT_ENTROPY_MANAGER_H_
9 #define NET_QUIC_QUIC_SENT_ENTROPY_MANAGER_H_ 9 #define NET_QUIC_QUIC_SENT_ENTROPY_MANAGER_H_
10 10
(...skipping 23 matching lines...) Expand all
34 QuicPacketEntropyHash entropy_hash); 34 QuicPacketEntropyHash entropy_hash);
35 35
36 // Retrieves the cumulative entropy up to |packet_number|. 36 // Retrieves the cumulative entropy up to |packet_number|.
37 // Must always be called with a monotonically increasing |packet_number|. 37 // Must always be called with a monotonically increasing |packet_number|.
38 QuicPacketEntropyHash GetCumulativeEntropy(QuicPacketNumber packet_number); 38 QuicPacketEntropyHash GetCumulativeEntropy(QuicPacketNumber packet_number);
39 39
40 // Returns true if |entropy_hash| matches the expected sent entropy hash 40 // Returns true if |entropy_hash| matches the expected sent entropy hash
41 // up to |largest_observed| removing packet numbers from |missing_packets|. 41 // up to |largest_observed| removing packet numbers from |missing_packets|.
42 // Must always be called with a monotonically increasing |largest_observed|. 42 // Must always be called with a monotonically increasing |largest_observed|.
43 bool IsValidEntropy(QuicPacketNumber largest_observed, 43 bool IsValidEntropy(QuicPacketNumber largest_observed,
44 const PacketNumberSet& missing_packets, 44 const PacketNumberQueue& missing_packets,
45 QuicPacketEntropyHash entropy_hash); 45 QuicPacketEntropyHash entropy_hash);
46 46
47 // Removes unnecessary entries before |packet_number|. 47 // Removes unnecessary entries before |packet_number|.
48 void ClearEntropyBefore(QuicPacketNumber packet_number); 48 void ClearEntropyBefore(QuicPacketNumber packet_number);
49 49
50 private: 50 private:
51 friend class test::QuicConnectionPeer; 51 friend class test::QuicConnectionPeer;
52 52
53 typedef std::deque<QuicPacketEntropyHash> SentEntropyMap; 53 typedef std::deque<QuicPacketEntropyHash> SentEntropyMap;
54 54
(...skipping 23 matching lines...) Expand all
78 78
79 // Cache the cumulative entropy for the packet number used by EntropyHash. 79 // Cache the cumulative entropy for the packet number used by EntropyHash.
80 CumulativeEntropy last_cumulative_entropy_; 80 CumulativeEntropy last_cumulative_entropy_;
81 81
82 DISALLOW_COPY_AND_ASSIGN(QuicSentEntropyManager); 82 DISALLOW_COPY_AND_ASSIGN(QuicSentEntropyManager);
83 }; 83 };
84 84
85 } // namespace net 85 } // namespace net
86 86
87 #endif // NET_QUIC_QUIC_SENT_ENTROPY_MANAGER_H_ 87 #endif // NET_QUIC_QUIC_SENT_ENTROPY_MANAGER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698