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

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

Issue 683113005: Update from chromium https://crrev.com/302282 (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 years, 1 month 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_session_test.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 114 matching lines...) Expand 10 before | Expand all | Expand 10 after
125 // |largest_acked_packet| are discarded if they are only for the RTT purposes. 125 // |largest_acked_packet| are discarded if they are only for the RTT purposes.
126 void IncreaseLargestObserved(QuicPacketSequenceNumber largest_observed); 126 void IncreaseLargestObserved(QuicPacketSequenceNumber largest_observed);
127 127
128 // Remove any packets no longer needed for retransmission, congestion, or 128 // Remove any packets no longer needed for retransmission, congestion, or
129 // RTT measurement purposes. 129 // RTT measurement purposes.
130 void RemoveObsoletePackets(); 130 void RemoveObsoletePackets();
131 131
132 private: 132 private:
133 // Called when a packet is retransmitted with a new sequence number. 133 // Called when a packet is retransmitted with a new sequence number.
134 // |old_sequence_number| will remain unacked, but will have no 134 // |old_sequence_number| will remain unacked, but will have no
135 // retransmittable data associated with it. A transmission info will be 135 // retransmittable data associated with it. Retransmittable frames will be
136 // created for |new_sequence_number| and returned. 136 // transferred to |info| and all_transmissions will be populated.
137 TransmissionInfo OnRetransmittedPacket( 137 void TransferRetransmissionInfo(QuicPacketSequenceNumber old_sequence_number,
138 QuicPacketSequenceNumber old_sequence_number, 138 QuicPacketSequenceNumber new_sequence_number,
139 QuicPacketSequenceNumber new_sequence_number, 139 TransmissionType transmission_type,
140 TransmissionType transmission_type); 140 TransmissionInfo* info);
141 141
142 void MaybeRemoveRetransmittableFrames(TransmissionInfo* transmission_info); 142 void MaybeRemoveRetransmittableFrames(TransmissionInfo* transmission_info);
143 143
144 // Returns true if the packet no longer has a purpose in the map. 144 // Returns true if the packet no longer has a purpose in the map.
145 bool IsPacketUseless(QuicPacketSequenceNumber sequence_number, 145 bool IsPacketUseless(QuicPacketSequenceNumber sequence_number,
146 const TransmissionInfo& info) const; 146 const TransmissionInfo& info) const;
147 // Returns true if the packet is useless or it's only purpose is RTT 147 // Returns true if the packet is useless or it's only purpose is RTT
148 // measurement, and it's old enough that is unlikely to ever happen. 148 // measurement, and it's old enough that is unlikely to ever happen.
149 bool IsPacketRemovable(QuicPacketSequenceNumber sequence_number, 149 bool IsPacketRemovable(QuicPacketSequenceNumber sequence_number,
150 const TransmissionInfo& info) const; 150 const TransmissionInfo& info) const;
(...skipping 16 matching lines...) Expand all
167 size_t bytes_in_flight_; 167 size_t 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_session_test.cc ('k') | net/quic/quic_unacked_packet_map.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698