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

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

Issue 761903003: Update from https://crrev.com/306655 (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 years 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
« no previous file with comments | « net/quic/quic_time.cc ('k') | net/quic/quic_unacked_packet_map.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 #ifndef NET_QUIC_QUIC_UNACKED_PACKET_MAP_H_ 5 #ifndef NET_QUIC_QUIC_UNACKED_PACKET_MAP_H_
6 #define NET_QUIC_QUIC_UNACKED_PACKET_MAP_H_ 6 #define NET_QUIC_QUIC_UNACKED_PACKET_MAP_H_
7 7
8 #include <deque> 8 #include <deque>
9 9
10 #include "net/quic/quic_protocol.h" 10 #include "net/quic/quic_protocol.h"
(...skipping 20 matching lines...) Expand all
31 TransmissionType transmission_type, 31 TransmissionType transmission_type,
32 QuicTime sent_time, 32 QuicTime sent_time,
33 QuicByteCount bytes_sent, 33 QuicByteCount bytes_sent,
34 bool set_in_flight); 34 bool set_in_flight);
35 35
36 // Returns true if the packet |sequence_number| is unacked. 36 // Returns true if the packet |sequence_number| is unacked.
37 bool IsUnacked(QuicPacketSequenceNumber sequence_number) const; 37 bool IsUnacked(QuicPacketSequenceNumber sequence_number) const;
38 38
39 // Sets the nack count to the max of the current nack count and |min_nacks|. 39 // Sets the nack count to the max of the current nack count and |min_nacks|.
40 void NackPacket(QuicPacketSequenceNumber sequence_number, 40 void NackPacket(QuicPacketSequenceNumber sequence_number,
41 size_t min_nacks); 41 QuicPacketCount min_nacks);
42 42
43 // Marks |sequence_number| as no longer in flight. 43 // Marks |sequence_number| as no longer in flight.
44 void RemoveFromInFlight(QuicPacketSequenceNumber sequence_number); 44 void RemoveFromInFlight(QuicPacketSequenceNumber sequence_number);
45 45
46 // Returns true if the unacked packet |sequence_number| has retransmittable 46 // Returns true if the unacked packet |sequence_number| has retransmittable
47 // frames. This will return false if the packet has been acked, if a 47 // frames. This will return false if the packet has been acked, if a
48 // previous transmission of this packet was ACK'd, or if this packet has been 48 // previous transmission of this packet was ACK'd, or if this packet has been
49 // retransmitted as with different sequence number, or if the packet never 49 // retransmitted as with different sequence number, or if the packet never
50 // had any retransmittable packets in the first place. 50 // had any retransmittable packets in the first place.
51 bool HasRetransmittableFrames(QuicPacketSequenceNumber sequence_number) const; 51 bool HasRetransmittableFrames(QuicPacketSequenceNumber sequence_number) const;
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after
157 // retransmitted, this map will contain entries for both the old and the new 157 // retransmitted, this map will contain entries for both the old and the new
158 // packet. The old packet's retransmittable frames entry will be nullptr, 158 // packet. The old packet's retransmittable frames entry will be nullptr,
159 // while the new packet's entry will contain the frames to retransmit. 159 // while the new packet's entry will contain the frames to retransmit.
160 // If the old packet is acked before the new packet, then the old entry will 160 // If the old packet is acked before the new packet, then the old entry will
161 // be removed from the map and the new entry's retransmittable frames will be 161 // be removed from the map and the new entry's retransmittable frames will be
162 // set to nullptr. 162 // set to nullptr.
163 UnackedPacketMap unacked_packets_; 163 UnackedPacketMap unacked_packets_;
164 // The packet at the 0th index of unacked_packets_. 164 // The packet at the 0th index of unacked_packets_.
165 QuicPacketSequenceNumber least_unacked_; 165 QuicPacketSequenceNumber least_unacked_;
166 166
167 size_t bytes_in_flight_; 167 QuicByteCount bytes_in_flight_;
168 // Number of retransmittable crypto handshake packets. 168 // Number of retransmittable crypto handshake packets.
169 size_t pending_crypto_packet_count_; 169 size_t pending_crypto_packet_count_;
170 170
171 DISALLOW_COPY_AND_ASSIGN(QuicUnackedPacketMap); 171 DISALLOW_COPY_AND_ASSIGN(QuicUnackedPacketMap);
172 }; 172 };
173 173
174 } // namespace net 174 } // namespace net
175 175
176 #endif // NET_QUIC_QUIC_UNACKED_PACKET_MAP_H_ 176 #endif // NET_QUIC_QUIC_UNACKED_PACKET_MAP_H_
OLDNEW
« no previous file with comments | « net/quic/quic_time.cc ('k') | net/quic/quic_unacked_packet_map.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698