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

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

Issue 556103002: Simplify QuicUnackedPacketMap's RemovePreviousTransmissions by always (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@discard_old_packets_74814618
Patch Set: Created 6 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
« no previous file with comments | « net/quic/quic_sent_packet_manager.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 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
79 // Packets marked as in flight are expected to be marked as missing when they 79 // Packets marked as in flight are expected to be marked as missing when they
80 // don't arrive, indicating the need for retransmission. 80 // don't arrive, indicating the need for retransmission.
81 void SetSent(QuicPacketSequenceNumber sequence_number, 81 void SetSent(QuicPacketSequenceNumber sequence_number,
82 QuicTime sent_time, 82 QuicTime sent_time,
83 QuicByteCount bytes_sent, 83 QuicByteCount bytes_sent,
84 bool set_in_flight); 84 bool set_in_flight);
85 85
86 // Restores the in flight status for a packet that was previously sent. 86 // Restores the in flight status for a packet that was previously sent.
87 void RestoreInFlight(QuicPacketSequenceNumber sequence_number); 87 void RestoreInFlight(QuicPacketSequenceNumber sequence_number);
88 88
89 // Clears up to |num_to_clear| previous transmissions in order to make room 89 // Clears all previous transmissions in order to make room in the ack frame
90 // in the ack frame for new acks. 90 // for newly acked packets.
91 void ClearPreviousRetransmissions(size_t num_to_clear); 91 void ClearAllPreviousRetransmissions();
92 92
93 typedef std::deque<TransmissionInfo> UnackedPacketMap; 93 typedef std::deque<TransmissionInfo> UnackedPacketMap;
94 94
95 typedef UnackedPacketMap::const_iterator const_iterator; 95 typedef UnackedPacketMap::const_iterator const_iterator;
96 96
97 const_iterator begin() const { return unacked_packets_.begin(); } 97 const_iterator begin() const { return unacked_packets_.begin(); }
98 const_iterator end() const { return unacked_packets_.end(); } 98 const_iterator end() const { return unacked_packets_.end(); }
99 99
100 // Returns true if there are unacked packets that are in flight. 100 // Returns true if there are unacked packets that are in flight.
101 bool HasInFlightPackets() const; 101 bool HasInFlightPackets() const;
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
162 size_t bytes_in_flight_; 162 size_t bytes_in_flight_;
163 // Number of retransmittable crypto handshake packets. 163 // Number of retransmittable crypto handshake packets.
164 size_t pending_crypto_packet_count_; 164 size_t pending_crypto_packet_count_;
165 165
166 DISALLOW_COPY_AND_ASSIGN(QuicUnackedPacketMap); 166 DISALLOW_COPY_AND_ASSIGN(QuicUnackedPacketMap);
167 }; 167 };
168 168
169 } // namespace net 169 } // namespace net
170 170
171 #endif // NET_QUIC_QUIC_UNACKED_PACKET_MAP_H_ 171 #endif // NET_QUIC_QUIC_UNACKED_PACKET_MAP_H_
OLDNEW
« no previous file with comments | « net/quic/quic_sent_packet_manager.cc ('k') | net/quic/quic_unacked_packet_map.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698