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

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

Issue 355573007: Land Recent QUIC Changes. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: added NET_EXPORT_PRIVATE for ContainsQuicTag Created 6 years, 5 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
« no previous file with comments | « net/quic/quic_headers_stream.cc ('k') | net/quic/quic_packet_creator.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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 // Accumulates frames for the next packet until more frames no longer fit or 5 // Accumulates frames for the next packet until more frames no longer fit or
6 // it's time to create a packet from them. Also provides packet creation of 6 // it's time to create a packet from them. Also provides packet creation of
7 // FEC packets based on previously created packets. 7 // FEC packets based on previously created packets.
8 8
9 #ifndef NET_QUIC_QUIC_PACKET_CREATOR_H_ 9 #ifndef NET_QUIC_QUIC_PACKET_CREATOR_H_
10 #define NET_QUIC_QUIC_PACKET_CREATOR_H_ 10 #define NET_QUIC_QUIC_PACKET_CREATOR_H_
(...skipping 207 matching lines...) Expand 10 before | Expand all | Expand 10 after
218 DCHECK(fec_group_.get() == NULL && queued_frames_.empty()); 218 DCHECK(fec_group_.get() == NULL && queued_frames_.empty());
219 max_packet_length_ = length; 219 max_packet_length_ = length;
220 } 220 }
221 221
222 // Returns current max number of packets covered by an FEC group. 222 // Returns current max number of packets covered by an FEC group.
223 size_t max_packets_per_fec_group() const { 223 size_t max_packets_per_fec_group() const {
224 return max_packets_per_fec_group_; 224 return max_packets_per_fec_group_;
225 } 225 }
226 226
227 // Sets creator's max number of packets covered by an FEC group. 227 // Sets creator's max number of packets covered by an FEC group.
228 void set_max_packets_per_fec_group( 228 void set_max_packets_per_fec_group(size_t max_packets_per_fec_group) {
229 size_t max_packets_per_fec_group) {
230 // To turn off FEC protection, use StopFecProtectingPackets(). 229 // To turn off FEC protection, use StopFecProtectingPackets().
231 DCHECK_NE(0u, max_packets_per_fec_group); 230 DCHECK_NE(0u, max_packets_per_fec_group);
232 max_packets_per_fec_group_ = max_packets_per_fec_group; 231 max_packets_per_fec_group_ = max_packets_per_fec_group;
233 } 232 }
234 233
235 private: 234 private:
236 friend class test::QuicPacketCreatorPeer; 235 friend class test::QuicPacketCreatorPeer;
237 236
238 static bool ShouldRetransmit(const QuicFrame& frame); 237 static bool ShouldRetransmit(const QuicFrame& frame);
239 238
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
290 mutable size_t packet_size_; 289 mutable size_t packet_size_;
291 QuicFrames queued_frames_; 290 QuicFrames queued_frames_;
292 scoped_ptr<RetransmittableFrames> queued_retransmittable_frames_; 291 scoped_ptr<RetransmittableFrames> queued_retransmittable_frames_;
293 292
294 DISALLOW_COPY_AND_ASSIGN(QuicPacketCreator); 293 DISALLOW_COPY_AND_ASSIGN(QuicPacketCreator);
295 }; 294 };
296 295
297 } // namespace net 296 } // namespace net
298 297
299 #endif // NET_QUIC_QUIC_PACKET_CREATOR_H_ 298 #endif // NET_QUIC_QUIC_PACKET_CREATOR_H_
OLDNEW
« no previous file with comments | « net/quic/quic_headers_stream.cc ('k') | net/quic/quic_packet_creator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698