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

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

Issue 1399893005: relnote: Inline all frames smaller than a pointer into QuicFrame. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@Avoid_redundant_recvmmsg_104327020
Patch Set: Created 5 years, 2 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_test.cc ('k') | net/quic/quic_packet_creator_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/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 624 matching lines...) Expand 10 before | Expand all | Expand 10 after
635 void QuicPacketCreator::MaybeAddPadding() { 635 void QuicPacketCreator::MaybeAddPadding() {
636 if (!needs_padding_) { 636 if (!needs_padding_) {
637 return; 637 return;
638 } 638 }
639 639
640 if (BytesFree() == 0) { 640 if (BytesFree() == 0) {
641 // Don't pad full packets. 641 // Don't pad full packets.
642 return; 642 return;
643 } 643 }
644 644
645 QuicPaddingFrame padding; 645 bool success = AddFrame(QuicFrame(QuicPaddingFrame()), false, false, nullptr);
646 bool success = AddFrame(QuicFrame(&padding), false, false, nullptr);
647 DCHECK(success); 646 DCHECK(success);
648 } 647 }
649 648
650 } // namespace net 649 } // namespace net
OLDNEW
« no previous file with comments | « net/quic/quic_framer_test.cc ('k') | net/quic/quic_packet_creator_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698