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

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

Issue 266243004: Clang format slam. Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 7 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 | Annotate | Revision Log
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 #ifndef NET_QUIC_QUIC_SENT_PACKET_MANAGER_H_ 5 #ifndef NET_QUIC_QUIC_SENT_PACKET_MANAGER_H_
6 #define NET_QUIC_QUIC_SENT_PACKET_MANAGER_H_ 6 #define NET_QUIC_QUIC_SENT_PACKET_MANAGER_H_
7 7
8 #include <deque> 8 #include <deque>
9 #include <list> 9 #include <list>
10 #include <map> 10 #include <map>
(...skipping 29 matching lines...) Expand all
40 // retransmitted, it will keep track of each version of a packet so that if a 40 // retransmitted, it will keep track of each version of a packet so that if a
41 // previous transmission is acked, the data will not be retransmitted. 41 // previous transmission is acked, the data will not be retransmitted.
42 class NET_EXPORT_PRIVATE QuicSentPacketManager { 42 class NET_EXPORT_PRIVATE QuicSentPacketManager {
43 public: 43 public:
44 // Struct to store the pending retransmission information. 44 // Struct to store the pending retransmission information.
45 struct PendingRetransmission { 45 struct PendingRetransmission {
46 PendingRetransmission(QuicPacketSequenceNumber sequence_number, 46 PendingRetransmission(QuicPacketSequenceNumber sequence_number,
47 TransmissionType transmission_type, 47 TransmissionType transmission_type,
48 const RetransmittableFrames& retransmittable_frames, 48 const RetransmittableFrames& retransmittable_frames,
49 QuicSequenceNumberLength sequence_number_length) 49 QuicSequenceNumberLength sequence_number_length)
50 : sequence_number(sequence_number), 50 : sequence_number(sequence_number),
51 transmission_type(transmission_type), 51 transmission_type(transmission_type),
52 retransmittable_frames(retransmittable_frames), 52 retransmittable_frames(retransmittable_frames),
53 sequence_number_length(sequence_number_length) { 53 sequence_number_length(sequence_number_length) {}
54 }
55 54
56 QuicPacketSequenceNumber sequence_number; 55 QuicPacketSequenceNumber sequence_number;
57 TransmissionType transmission_type; 56 TransmissionType transmission_type;
58 const RetransmittableFrames& retransmittable_frames; 57 const RetransmittableFrames& retransmittable_frames;
59 QuicSequenceNumberLength sequence_number_length; 58 QuicSequenceNumberLength sequence_number_length;
60 }; 59 };
61 60
62 QuicSentPacketManager(bool is_server, 61 QuicSentPacketManager(bool is_server,
63 const QuicClock* clock, 62 const QuicClock* clock,
64 QuicConnectionStats* stats, 63 QuicConnectionStats* stats,
65 CongestionFeedbackType congestion_type, 64 CongestionFeedbackType congestion_type,
66 LossDetectionType loss_type); 65 LossDetectionType loss_type);
67 virtual ~QuicSentPacketManager(); 66 virtual ~QuicSentPacketManager();
68 67
69 virtual void SetFromConfig(const QuicConfig& config); 68 virtual void SetFromConfig(const QuicConfig& config);
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after
182 RTO_MODE, 181 RTO_MODE,
183 // A tail loss probe. By default, QUIC sends up to two before RTOing. 182 // A tail loss probe. By default, QUIC sends up to two before RTOing.
184 TLP_MODE, 183 TLP_MODE,
185 // Retransmission of handshake packets prior to handshake completion. 184 // Retransmission of handshake packets prior to handshake completion.
186 HANDSHAKE_MODE, 185 HANDSHAKE_MODE,
187 // Re-invoke the loss detection when a packet is not acked before the 186 // Re-invoke the loss detection when a packet is not acked before the
188 // loss detection algorithm expects. 187 // loss detection algorithm expects.
189 LOSS_MODE, 188 LOSS_MODE,
190 }; 189 };
191 190
192 typedef linked_hash_map<QuicPacketSequenceNumber, 191 typedef linked_hash_map<QuicPacketSequenceNumber, TransmissionType>
193 TransmissionType> PendingRetransmissionMap; 192 PendingRetransmissionMap;
194 193
195 // Process the incoming ack looking for newly ack'd data packets. 194 // Process the incoming ack looking for newly ack'd data packets.
196 void HandleAckForSentPackets(const ReceivedPacketInfo& received_info); 195 void HandleAckForSentPackets(const ReceivedPacketInfo& received_info);
197 196
198 // Called when a packet is timed out, such as an RTO. Removes the bytes from 197 // Called when a packet is timed out, such as an RTO. Removes the bytes from
199 // the congestion manager, but does not change the congestion window size. 198 // the congestion manager, but does not change the congestion window size.
200 void OnPacketAbandoned(QuicPacketSequenceNumber sequence_number); 199 void OnPacketAbandoned(QuicPacketSequenceNumber sequence_number);
201 200
202 // Returns the current retransmission mode. 201 // Returns the current retransmission mode.
203 RetransmissionTimeoutMode GetRetransmissionMode() const; 202 RetransmissionTimeoutMode GetRetransmissionMode() const;
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
290 // Maximum number of tail loss probes to send before firing an RTO. 289 // Maximum number of tail loss probes to send before firing an RTO.
291 size_t max_tail_loss_probes_; 290 size_t max_tail_loss_probes_;
292 bool using_pacing_; 291 bool using_pacing_;
293 292
294 DISALLOW_COPY_AND_ASSIGN(QuicSentPacketManager); 293 DISALLOW_COPY_AND_ASSIGN(QuicSentPacketManager);
295 }; 294 };
296 295
297 } // namespace net 296 } // namespace net
298 297
299 #endif // NET_QUIC_QUIC_SENT_PACKET_MANAGER_H_ 298 #endif // NET_QUIC_QUIC_SENT_PACKET_MANAGER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698