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

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

Issue 1191823003: relnote: Minor QUIC code cleanups. No functional change. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@Increase_the_maximum_number_tracked_96205856
Patch Set: Created 5 years, 6 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_framer.cc ('k') | net/quic/test_tools/quic_test_utils.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 #include "net/quic/quic_packet_creator.h" 5 #include "net/quic/quic_packet_creator.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/basictypes.h" 9 #include "base/basictypes.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 176 matching lines...) Expand 10 before | Expand all | Expand 10 after
187 } 187 }
188 188
189 InFecGroup QuicPacketCreator::MaybeUpdateLengthsAndStartFec() { 189 InFecGroup QuicPacketCreator::MaybeUpdateLengthsAndStartFec() {
190 if (fec_group_.get() != nullptr) { 190 if (fec_group_.get() != nullptr) {
191 // Don't update any lengths when an FEC group is open, to ensure same 191 // Don't update any lengths when an FEC group is open, to ensure same
192 // packet header size in all packets within a group. 192 // packet header size in all packets within a group.
193 return IN_FEC_GROUP; 193 return IN_FEC_GROUP;
194 } 194 }
195 if (!queued_frames_.empty()) { 195 if (!queued_frames_.empty()) {
196 // Don't change creator state if there are frames queued. 196 // Don't change creator state if there are frames queued.
197 return fec_group_.get() == nullptr ? NOT_IN_FEC_GROUP : IN_FEC_GROUP; 197 return NOT_IN_FEC_GROUP;
198 } 198 }
199 199
200 // Update sequence number length only on packet and FEC group boundaries. 200 // Update sequence number length only on packet and FEC group boundaries.
201 sequence_number_length_ = next_sequence_number_length_; 201 sequence_number_length_ = next_sequence_number_length_;
202 202
203 if (!should_fec_protect_) { 203 if (!should_fec_protect_) {
204 return NOT_IN_FEC_GROUP; 204 return NOT_IN_FEC_GROUP;
205 } 205 }
206 // Start a new FEC group since protection is on. Set the fec group number to 206 // Start a new FEC group since protection is on. Set the fec group number to
207 // the sequence number of the next packet. 207 // the sequence number of the next packet.
(...skipping 408 matching lines...) Expand 10 before | Expand all | Expand 10 after
616 // Don't pad full packets. 616 // Don't pad full packets.
617 return; 617 return;
618 } 618 }
619 619
620 QuicPaddingFrame padding; 620 QuicPaddingFrame padding;
621 bool success = AddFrame(QuicFrame(&padding), false, false, nullptr); 621 bool success = AddFrame(QuicFrame(&padding), false, false, nullptr);
622 DCHECK(success); 622 DCHECK(success);
623 } 623 }
624 624
625 } // namespace net 625 } // namespace net
OLDNEW
« no previous file with comments | « net/quic/quic_framer.cc ('k') | net/quic/test_tools/quic_test_utils.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698