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

Side by Side Diff: net/quic/quic_unacked_packet_map.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 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 "net/base/linked_hash_map.h" 8 #include "net/base/linked_hash_map.h"
9 #include "net/quic/quic_protocol.h" 9 #include "net/quic/quic_protocol.h"
10 10
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
59 void OnRetransmittedPacket(QuicPacketSequenceNumber old_sequence_number, 59 void OnRetransmittedPacket(QuicPacketSequenceNumber old_sequence_number,
60 QuicPacketSequenceNumber new_sequence_number); 60 QuicPacketSequenceNumber new_sequence_number);
61 61
62 // Returns true if the packet |sequence_number| is unacked. 62 // Returns true if the packet |sequence_number| is unacked.
63 bool IsUnacked(QuicPacketSequenceNumber sequence_number) const; 63 bool IsUnacked(QuicPacketSequenceNumber sequence_number) const;
64 64
65 // Returns true if the packet |sequence_number| is pending. 65 // Returns true if the packet |sequence_number| is pending.
66 bool IsPending(QuicPacketSequenceNumber sequence_number) const; 66 bool IsPending(QuicPacketSequenceNumber sequence_number) const;
67 67
68 // Sets the nack count to the max of the current nack count and |min_nacks|. 68 // Sets the nack count to the max of the current nack count and |min_nacks|.
69 void NackPacket(QuicPacketSequenceNumber sequence_number, 69 void NackPacket(QuicPacketSequenceNumber sequence_number, size_t min_nacks);
70 size_t min_nacks);
71 70
72 // Marks |sequence_number| as no longer pending. 71 // Marks |sequence_number| as no longer pending.
73 void SetNotPending(QuicPacketSequenceNumber sequence_number); 72 void SetNotPending(QuicPacketSequenceNumber sequence_number);
74 73
75 // Returns true if the unacked packet |sequence_number| has retransmittable 74 // Returns true if the unacked packet |sequence_number| has retransmittable
76 // frames. This will return false if the packet has been acked, if a 75 // frames. This will return false if the packet has been acked, if a
77 // previous transmission of this packet was ACK'd, or if this packet has been 76 // previous transmission of this packet was ACK'd, or if this packet has been
78 // retransmitted as with different sequence number, or if the packet never 77 // retransmitted as with different sequence number, or if the packet never
79 // had any retransmittable packets in the first place. 78 // had any retransmittable packets in the first place.
80 bool HasRetransmittableFrames(QuicPacketSequenceNumber sequence_number) const; 79 bool HasRetransmittableFrames(QuicPacketSequenceNumber sequence_number) const;
(...skipping 27 matching lines...) Expand all
108 // don't arrive, indicating the need for retransmission. 107 // don't arrive, indicating the need for retransmission.
109 void SetSent(QuicPacketSequenceNumber sequence_number, 108 void SetSent(QuicPacketSequenceNumber sequence_number,
110 QuicTime sent_time, 109 QuicTime sent_time,
111 QuicByteCount bytes_sent, 110 QuicByteCount bytes_sent,
112 bool set_pending); 111 bool set_pending);
113 112
114 // Clears up to |num_to_clear| previous transmissions in order to make room 113 // Clears up to |num_to_clear| previous transmissions in order to make room
115 // in the ack frame for new acks. 114 // in the ack frame for new acks.
116 void ClearPreviousRetransmissions(size_t num_to_clear); 115 void ClearPreviousRetransmissions(size_t num_to_clear);
117 116
118 typedef linked_hash_map<QuicPacketSequenceNumber, 117 typedef linked_hash_map<QuicPacketSequenceNumber, TransmissionInfo>
119 TransmissionInfo> UnackedPacketMap; 118 UnackedPacketMap;
120 119
121 typedef UnackedPacketMap::const_iterator const_iterator; 120 typedef UnackedPacketMap::const_iterator const_iterator;
122 121
123 const_iterator begin() const { return unacked_packets_.begin(); } 122 const_iterator begin() const { return unacked_packets_.begin(); }
124 const_iterator end() const { return unacked_packets_.end(); } 123 const_iterator end() const { return unacked_packets_.end(); }
125 124
126 // Returns true if there are unacked packets that are pending. 125 // Returns true if there are unacked packets that are pending.
127 bool HasPendingPackets() const; 126 bool HasPendingPackets() const;
128 127
129 // Returns the TransmissionInfo associated with |sequence_number|, which 128 // Returns the TransmissionInfo associated with |sequence_number|, which
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
174 size_t bytes_in_flight_; 173 size_t bytes_in_flight_;
175 // Number of outstanding crypto handshake packets. 174 // Number of outstanding crypto handshake packets.
176 size_t pending_crypto_packet_count_; 175 size_t pending_crypto_packet_count_;
177 176
178 DISALLOW_COPY_AND_ASSIGN(QuicUnackedPacketMap); 177 DISALLOW_COPY_AND_ASSIGN(QuicUnackedPacketMap);
179 }; 178 };
180 179
181 } // namespace net 180 } // namespace net
182 181
183 #endif // NET_QUIC_QUIC_UNACKED_PACKET_MAP_H_ 182 #endif // NET_QUIC_QUIC_UNACKED_PACKET_MAP_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698