| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 |
| OLD | NEW |