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

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

Issue 706203003: Update from https://crrev.com/303153 (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 years, 1 month 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/tools/quic/test_tools/quic_test_client.cc ('k') | net/tools/testserver/testserver.py » ('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/tools/quic/test_tools/quic_test_utils.h" 5 #include "net/tools/quic/test_tools/quic_test_utils.h"
6 6
7 #include "net/quic/quic_connection.h" 7 #include "net/quic/quic_connection.h"
8 #include "net/quic/test_tools/quic_connection_peer.h" 8 #include "net/quic/test_tools/quic_connection_peer.h"
9 #include "net/quic/test_tools/quic_test_utils.h" 9 #include "net/quic/test_tools/quic_test_utils.h"
10 #include "net/tools/quic/quic_epoll_connection_helper.h" 10 #include "net/tools/quic/quic_epoll_connection_helper.h"
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
88 QuicAckFrame ack = MakeAckFrame(2 * num_nack_ranges + least_unacked); 88 QuicAckFrame ack = MakeAckFrame(2 * num_nack_ranges + least_unacked);
89 // Add enough missing packets to get num_nack_ranges nack ranges. 89 // Add enough missing packets to get num_nack_ranges nack ranges.
90 for (QuicPacketSequenceNumber i = 1; i < 2 * num_nack_ranges; i += 2) { 90 for (QuicPacketSequenceNumber i = 1; i < 2 * num_nack_ranges; i += 2) {
91 ack.missing_packets.insert(least_unacked + i); 91 ack.missing_packets.insert(least_unacked + i);
92 } 92 }
93 return ack; 93 return ack;
94 } 94 }
95 95
96 TestSession::TestSession(QuicConnection* connection, 96 TestSession::TestSession(QuicConnection* connection,
97 const QuicConfig& config) 97 const QuicConfig& config)
98 : QuicSession(connection, config), 98 : QuicSession(connection, config, /*is_secure=*/false),
99 crypto_stream_(nullptr) { 99 crypto_stream_(nullptr) {
100 InitializeSession(); 100 InitializeSession();
101 } 101 }
102 102
103 TestSession::~TestSession() {} 103 TestSession::~TestSession() {}
104 104
105 void TestSession::SetCryptoStream(QuicCryptoStream* stream) { 105 void TestSession::SetCryptoStream(QuicCryptoStream* stream) {
106 crypto_stream_ = stream; 106 crypto_stream_ = stream;
107 } 107 }
108 108
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
173 factory_->current_writer_ = this; 173 factory_->current_writer_ = this;
174 return QuicPerConnectionPacketWriter::WritePacket(buffer, 174 return QuicPerConnectionPacketWriter::WritePacket(buffer,
175 buf_len, 175 buf_len,
176 self_address, 176 self_address,
177 peer_address); 177 peer_address);
178 } 178 }
179 179
180 } // namespace test 180 } // namespace test
181 } // namespace tools 181 } // namespace tools
182 } // namespace net 182 } // namespace net
OLDNEW
« no previous file with comments | « net/tools/quic/test_tools/quic_test_client.cc ('k') | net/tools/testserver/testserver.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698