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

Side by Side Diff: net/quic/test_tools/quic_packet_creator_peer.cc

Issue 1666553002: Make QUIC's SerializedPacket contain QuicFrames, rather than a pointer (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@113205205
Patch Set: Created 4 years, 10 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_utils.cc ('k') | no next file » | 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) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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/test_tools/quic_packet_creator_peer.h" 5 #include "net/quic/test_tools/quic_packet_creator_peer.h"
6 6
7 #include "net/quic/quic_packet_creator.h" 7 #include "net/quic/quic_packet_creator.h"
8 8
9 namespace net { 9 namespace net {
10 namespace test { 10 namespace test {
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after
120 DCHECK(creator->queued_frames_.empty()); 120 DCHECK(creator->queued_frames_.empty());
121 DCHECK(!frames.empty()); 121 DCHECK(!frames.empty());
122 for (const QuicFrame& frame : frames) { 122 for (const QuicFrame& frame : frames) {
123 bool success = creator->AddFrame(frame, false); 123 bool success = creator->AddFrame(frame, false);
124 DCHECK(success); 124 DCHECK(success);
125 } 125 }
126 creator->SerializePacket(buffer, buffer_len); 126 creator->SerializePacket(buffer, buffer_len);
127 SerializedPacket packet = creator->packet_; 127 SerializedPacket packet = creator->packet_;
128 // The caller takes ownership of the QuicEncryptedPacket. 128 // The caller takes ownership of the QuicEncryptedPacket.
129 creator->packet_.packet = nullptr; 129 creator->packet_.packet = nullptr;
130 DCHECK(packet.retransmittable_frames == nullptr); 130 DCHECK(packet.retransmittable_frames.empty());
131 return packet; 131 return packet;
132 } 132 }
133 133
134 // static 134 // static
135 void QuicPacketCreatorPeer::ResetFecGroup(QuicPacketCreator* creator) { 135 void QuicPacketCreatorPeer::ResetFecGroup(QuicPacketCreator* creator) {
136 creator->ResetFecGroup(); 136 creator->ResetFecGroup();
137 } 137 }
138 138
139 // static 139 // static
140 QuicTime::Delta QuicPacketCreatorPeer::GetFecTimeout( 140 QuicTime::Delta QuicPacketCreatorPeer::GetFecTimeout(
(...skipping 13 matching lines...) Expand all
154 return creator->packet_.encryption_level; 154 return creator->packet_.encryption_level;
155 } 155 }
156 156
157 // static 157 // static
158 QuicPathId QuicPacketCreatorPeer::GetCurrentPath(QuicPacketCreator* creator) { 158 QuicPathId QuicPacketCreatorPeer::GetCurrentPath(QuicPacketCreator* creator) {
159 return creator->packet_.path_id; 159 return creator->packet_.path_id;
160 } 160 }
161 161
162 } // namespace test 162 } // namespace test
163 } // namespace net 163 } // namespace net
OLDNEW
« no previous file with comments | « net/quic/quic_utils.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698