| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 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 // Provides a simple interface for QUIC tests to create a variety of packets. | 5 // Provides a simple interface for QUIC tests to create a variety of packets. |
| 6 | 6 |
| 7 #ifndef NET_QUIC_TEST_TOOLS_QUIC_TEST_PACKET_MAKER_H_ | 7 #ifndef NET_QUIC_TEST_TOOLS_QUIC_TEST_PACKET_MAKER_H_ |
| 8 #define NET_QUIC_TEST_TOOLS_QUIC_TEST_PACKET_MAKER_H_ | 8 #define NET_QUIC_TEST_TOOLS_QUIC_TEST_PACKET_MAKER_H_ |
| 9 | 9 |
| 10 #include <stddef.h> | 10 #include <stddef.h> |
| (...skipping 12 matching lines...) Expand all Loading... |
| 23 | 23 |
| 24 class QuicTestPacketMaker { | 24 class QuicTestPacketMaker { |
| 25 public: | 25 public: |
| 26 QuicTestPacketMaker(QuicVersion version, | 26 QuicTestPacketMaker(QuicVersion version, |
| 27 QuicConnectionId connection_id, | 27 QuicConnectionId connection_id, |
| 28 MockClock* clock, | 28 MockClock* clock, |
| 29 const std::string& host); | 29 const std::string& host); |
| 30 ~QuicTestPacketMaker(); | 30 ~QuicTestPacketMaker(); |
| 31 | 31 |
| 32 void set_hostname(const std::string& host); | 32 void set_hostname(const std::string& host); |
| 33 scoped_ptr<QuicEncryptedPacket> MakePingPacket(QuicPacketNumber num, |
| 34 bool include_version); |
| 33 scoped_ptr<QuicEncryptedPacket> MakeRstPacket( | 35 scoped_ptr<QuicEncryptedPacket> MakeRstPacket( |
| 34 QuicPacketNumber num, | 36 QuicPacketNumber num, |
| 35 bool include_version, | 37 bool include_version, |
| 36 QuicStreamId stream_id, | 38 QuicStreamId stream_id, |
| 37 QuicRstStreamErrorCode error_code); | 39 QuicRstStreamErrorCode error_code); |
| 38 scoped_ptr<QuicEncryptedPacket> MakeAckAndRstPacket( | 40 scoped_ptr<QuicEncryptedPacket> MakeAckAndRstPacket( |
| 39 QuicPacketNumber num, | 41 QuicPacketNumber num, |
| 40 bool include_version, | 42 bool include_version, |
| 41 QuicStreamId stream_id, | 43 QuicStreamId stream_id, |
| 42 QuicRstStreamErrorCode error_code, | 44 QuicRstStreamErrorCode error_code, |
| (...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 126 MockRandom random_generator_; | 128 MockRandom random_generator_; |
| 127 QuicPacketHeader header_; | 129 QuicPacketHeader header_; |
| 128 | 130 |
| 129 DISALLOW_COPY_AND_ASSIGN(QuicTestPacketMaker); | 131 DISALLOW_COPY_AND_ASSIGN(QuicTestPacketMaker); |
| 130 }; | 132 }; |
| 131 | 133 |
| 132 } // namespace test | 134 } // namespace test |
| 133 } // namespace net | 135 } // namespace net |
| 134 | 136 |
| 135 #endif // NET_QUIC_TEST_TOOLS_QUIC_TEST_PACKET_MAKER_H_ | 137 #endif // NET_QUIC_TEST_TOOLS_QUIC_TEST_PACKET_MAKER_H_ |
| OLD | NEW |