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

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

Issue 11958018: Queueing QUIC frames to be resent instead of packets and packing RST frames with acks and congestio… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 11 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
« net/quic/quic_connection.cc ('K') | « net/quic/quic_protocol.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) 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/test_tools/quic_test_utils.h" 5 #include "net/quic/test_tools/quic_test_utils.h"
6 6
7 #include "base/stl_util.h"
7 #include "net/quic/crypto/crypto_framer.h" 8 #include "net/quic/crypto/crypto_framer.h"
8 9
9 using std::max; 10 using std::max;
10 using std::min; 11 using std::min;
11 using std::string; 12 using std::string;
12 using testing::_; 13 using testing::_;
13 14
14 namespace net { 15 namespace net {
15 namespace test { 16 namespace test {
16 17
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
82 83
83 MockConnection::~MockConnection() { 84 MockConnection::~MockConnection() {
84 } 85 }
85 86
86 PacketSavingConnection::PacketSavingConnection(QuicGuid guid, 87 PacketSavingConnection::PacketSavingConnection(QuicGuid guid,
87 IPEndPoint address) 88 IPEndPoint address)
88 : MockConnection(guid, address) { 89 : MockConnection(guid, address) {
89 } 90 }
90 91
91 PacketSavingConnection::~PacketSavingConnection() { 92 PacketSavingConnection::~PacketSavingConnection() {
93 STLDeleteElements(&packets_);
92 } 94 }
93 95
94 bool PacketSavingConnection::SendPacket(QuicPacketSequenceNumber number, 96 bool PacketSavingConnection::SendPacket(QuicPacketSequenceNumber number,
95 QuicPacket* packet, 97 QuicPacket* packet,
96 bool should_resend, 98 bool should_resend,
97 bool force, 99 bool force,
98 bool is_retransmit) { 100 bool is_retransmit) {
99 packets_.push_back(packet); 101 packets_.push_back(packet);
100 return true; 102 return true;
101 } 103 }
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after
209 data->AsStringPiece()); 211 data->AsStringPiece());
210 212
211 QuicFrame frame(&stream_frame); 213 QuicFrame frame(&stream_frame);
212 QuicFrames frames; 214 QuicFrames frames;
213 frames.push_back(frame); 215 frames.push_back(frame);
214 return quic_framer.ConstructFrameDataPacket(header, frames); 216 return quic_framer.ConstructFrameDataPacket(header, frames);
215 } 217 }
216 218
217 } // namespace test 219 } // namespace test
218 } // namespace net 220 } // namespace net
OLDNEW
« net/quic/quic_connection.cc ('K') | « net/quic/quic_protocol.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698