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

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

Issue 454263002: QUIC - clean up changes to keep in sync with internal source tree. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase 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 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_RECEIVED_PACKET_MANAGER_H_ 8 #ifndef NET_QUIC_QUIC_RECEIVED_PACKET_MANAGER_H_
9 #define NET_QUIC_QUIC_RECEIVED_PACKET_MANAGER_H_ 9 #define NET_QUIC_QUIC_RECEIVED_PACKET_MANAGER_H_
10 10
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
107 QuicTime receipt_time); 107 QuicTime receipt_time);
108 108
109 void RecordPacketRevived(QuicPacketSequenceNumber sequence_number); 109 void RecordPacketRevived(QuicPacketSequenceNumber sequence_number);
110 110
111 // Checks whether |sequence_number| is missing and less than largest observed. 111 // Checks whether |sequence_number| is missing and less than largest observed.
112 bool IsMissing(QuicPacketSequenceNumber sequence_number); 112 bool IsMissing(QuicPacketSequenceNumber sequence_number);
113 113
114 // Checks if we're still waiting for the packet with |sequence_number|. 114 // Checks if we're still waiting for the packet with |sequence_number|.
115 bool IsAwaitingPacket(QuicPacketSequenceNumber sequence_number); 115 bool IsAwaitingPacket(QuicPacketSequenceNumber sequence_number);
116 116
117 // Update the |received_info| for an outgoing ack. 117 // Update the |ack_frame| for an outgoing ack.
118 void UpdateReceivedPacketInfo(QuicAckFrame* ack_frame, 118 void UpdateReceivedPacketInfo(QuicAckFrame* ack_frame,
119 QuicTime approximate_now); 119 QuicTime approximate_now);
120 120
121 // Should be called before sending an ACK packet, to decide if we need 121 // Should be called before sending an ACK packet, to decide if we need
122 // to attach a QuicCongestionFeedbackFrame block. 122 // to attach a QuicCongestionFeedbackFrame block.
123 // Returns false if no QuicCongestionFeedbackFrame block is needed. 123 // Returns false if no QuicCongestionFeedbackFrame block is needed.
124 // Otherwise fills in feedback and returns true. 124 // Otherwise fills in feedback and returns true.
125 virtual bool GenerateCongestionFeedback( 125 virtual bool GenerateCongestionFeedback(
126 QuicCongestionFeedbackFrame* feedback); 126 QuicCongestionFeedbackFrame* feedback);
127 127
128 // QuicReceivedEntropyHashCalculatorInterface 128 // QuicReceivedEntropyHashCalculatorInterface
129 // Called by QuicFramer, when the outgoing ack gets truncated, to recalculate 129 // Called by QuicFramer, when the outgoing ack gets truncated, to recalculate
130 // the received entropy hash for the truncated ack frame. 130 // the received entropy hash for the truncated ack frame.
131 virtual QuicPacketEntropyHash EntropyHash( 131 virtual QuicPacketEntropyHash EntropyHash(
132 QuicPacketSequenceNumber sequence_number) const OVERRIDE; 132 QuicPacketSequenceNumber sequence_number) const OVERRIDE;
133 133
134 // Updates internal state based on |received_info|. 134 // Updates internal state based on |ack_frame|.
135 void UpdatePacketInformationReceivedByPeer(const QuicAckFrame& ack_frame); 135 void UpdatePacketInformationReceivedByPeer(const QuicAckFrame& ack_frame);
136 // Updates internal state based on |stop_waiting|. 136 // Updates internal state based on |stop_waiting|.
137 void UpdatePacketInformationSentByPeer( 137 void UpdatePacketInformationSentByPeer(
138 const QuicStopWaitingFrame& stop_waiting); 138 const QuicStopWaitingFrame& stop_waiting);
139 139
140 // Returns whether the peer is missing packets. 140 // Returns whether the peer is missing packets.
141 bool HasMissingPackets(); 141 bool HasMissingPackets();
142 142
143 // Returns true when there are new missing packets to be reported within 3 143 // Returns true when there are new missing packets to be reported within 3
144 // packets of the largest observed. 144 // packets of the largest observed.
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
190 scoped_ptr<ReceiveAlgorithmInterface> receive_algorithm_; 190 scoped_ptr<ReceiveAlgorithmInterface> receive_algorithm_;
191 191
192 QuicConnectionStats* stats_; 192 QuicConnectionStats* stats_;
193 193
194 DISALLOW_COPY_AND_ASSIGN(QuicReceivedPacketManager); 194 DISALLOW_COPY_AND_ASSIGN(QuicReceivedPacketManager);
195 }; 195 };
196 196
197 } // namespace net 197 } // namespace net
198 198
199 #endif // NET_QUIC_QUIC_RECEIVED_PACKET_MANAGER_H_ 199 #endif // NET_QUIC_QUIC_RECEIVED_PACKET_MANAGER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698