OLD | NEW |
1 // Copyright (c) 2014 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2014 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 #ifndef NET_QUIC_TEST_TOOLS_QUIC_PACKET_GENERATOR_PEER_H_ | 5 #ifndef NET_QUIC_TEST_TOOLS_QUIC_PACKET_GENERATOR_PEER_H_ |
6 #define NET_QUIC_TEST_TOOLS_QUIC_PACKET_GENERATOR_PEER_H_ | 6 #define NET_QUIC_TEST_TOOLS_QUIC_PACKET_GENERATOR_PEER_H_ |
7 | 7 |
8 #include "net/quic/quic_protocol.h" | 8 #include "net/quic/quic_protocol.h" |
9 | 9 |
10 namespace net { | 10 namespace net { |
11 | 11 |
| 12 class QuicPacketCreator; |
12 class QuicPacketGenerator; | 13 class QuicPacketGenerator; |
13 | 14 |
14 namespace test { | 15 namespace test { |
15 | 16 |
16 class QuicPacketGeneratorPeer { | 17 class QuicPacketGeneratorPeer { |
17 public: | 18 public: |
18 static void MaybeStartFecProtection(QuicPacketGenerator* generator); | 19 static QuicPacketCreator* GetPacketCreator(QuicPacketGenerator* generator); |
19 | |
20 static void MaybeStopFecProtection(QuicPacketGenerator* generator, | |
21 bool force); | |
22 | |
23 // Convenience method for connection and above. Enables and turns on FEC | |
24 // protection in the generator. | |
25 static void SwitchFecProtectionOn(QuicPacketGenerator* generator, | |
26 size_t max_packets_per_fec_group); | |
27 | 20 |
28 private: | 21 private: |
29 DISALLOW_COPY_AND_ASSIGN(QuicPacketGeneratorPeer); | 22 DISALLOW_COPY_AND_ASSIGN(QuicPacketGeneratorPeer); |
30 }; | 23 }; |
31 | 24 |
32 } // namespace test | 25 } // namespace test |
33 | 26 |
34 } // namespace net | 27 } // namespace net |
35 | 28 |
36 #endif // NET_QUIC_TEST_TOOLS_QUIC_PACKET_GENERATOR_PEER_H_ | 29 #endif // NET_QUIC_TEST_TOOLS_QUIC_PACKET_GENERATOR_PEER_H_ |
OLD | NEW |