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

Side by Side Diff: net/quic/core/quic_packet_generator.cc

Issue 2850573002: Landing Recent QUIC changes until 3:35 PM, Apr 26, 2017 UTC-4 (Closed)
Patch Set: Remove Disconnect from ~QuicTestClient Created 3 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
« no previous file with comments | « net/quic/core/quic_packet_generator.h ('k') | net/quic/core/quic_packet_generator_test.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/core/quic_packet_generator.h" 5 #include "net/quic/core/quic_packet_generator.h"
6 6
7 #include <cstdint> 7 #include <cstdint>
8 8
9 #include "net/quic/core/crypto/quic_random.h" 9 #include "net/quic/core/crypto/quic_random.h"
10 #include "net/quic/core/quic_utils.h" 10 #include "net/quic/core/quic_utils.h"
(...skipping 330 matching lines...) Expand 10 before | Expand all | Expand 10 after
341 random_generator_->RandUint64() % kMaxNumRandomPaddingBytes + 1); 341 random_generator_->RandUint64() % kMaxNumRandomPaddingBytes + 1);
342 } 342 }
343 343
344 void QuicPacketGenerator::SendRemainingPendingPadding() { 344 void QuicPacketGenerator::SendRemainingPendingPadding() {
345 while (packet_creator_.pending_padding_bytes() > 0 && !HasQueuedFrames() && 345 while (packet_creator_.pending_padding_bytes() > 0 && !HasQueuedFrames() &&
346 CanSendWithNextPendingFrameAddition()) { 346 CanSendWithNextPendingFrameAddition()) {
347 packet_creator_.Flush(); 347 packet_creator_.Flush();
348 } 348 }
349 } 349 }
350 350
351 bool QuicPacketGenerator::HasRetransmittableFrames() const {
352 return !queued_control_frames_.empty() ||
353 packet_creator_.HasPendingRetransmittableFrames();
354 }
355
351 } // namespace net 356 } // namespace net
OLDNEW
« no previous file with comments | « net/quic/core/quic_packet_generator.h ('k') | net/quic/core/quic_packet_generator_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698