| 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 #ifndef NET_QUIC_TEST_TOOLS_QUIC_SENT_PACKET_MANAGER_PEER_H_ | 5 #ifndef NET_QUIC_TEST_TOOLS_QUIC_SENT_PACKET_MANAGER_PEER_H_ |
| 6 #define NET_QUIC_TEST_TOOLS_QUIC_SENT_PACKET_MANAGER_PEER_H_ | 6 #define NET_QUIC_TEST_TOOLS_QUIC_SENT_PACKET_MANAGER_PEER_H_ |
| 7 | 7 |
| 8 #include "net/quic/quic_protocol.h" | 8 #include "net/quic/quic_protocol.h" |
| 9 #include "net/quic/quic_sent_packet_manager.h" | 9 #include "net/quic/quic_sent_packet_manager.h" |
| 10 | 10 |
| 11 namespace net { | 11 namespace net { |
| 12 | 12 |
| 13 class SendAlgorithmInterface; | 13 class SendAlgorithmInterface; |
| 14 | 14 |
| 15 namespace test { | 15 namespace test { |
| 16 | 16 |
| 17 class QuicSentPacketManagerPeer { | 17 class QuicSentPacketManagerPeer { |
| 18 public: | 18 public: |
| 19 static void SetSendAlgorithm(QuicSentPacketManager* sent_packet_manager, | 19 static void SetSendAlgorithm(QuicSentPacketManager* sent_packet_manager, |
| 20 SendAlgorithmInterface* send_algorithm); | 20 SendAlgorithmInterface* send_algorithm); |
| 21 | 21 |
| 22 static size_t GetNackCount( | 22 static size_t GetNackCount( |
| 23 const QuicSentPacketManager* sent_packet_manager, | 23 const QuicSentPacketManager* sent_packet_manager, |
| 24 QuicPacketSequenceNumber sequence_number); | 24 QuicPacketSequenceNumber sequence_number); |
| 25 | 25 |
| 26 static QuicTime GetSentTime(const QuicSentPacketManager* sent_packet_manager, |
| 27 QuicPacketSequenceNumber sequence_number); |
| 28 |
| 26 static QuicTime::Delta rtt(QuicSentPacketManager* sent_packet_manager); | 29 static QuicTime::Delta rtt(QuicSentPacketManager* sent_packet_manager); |
| 27 | 30 |
| 28 // Returns true if |sequence_number| is a retransmission of a packet. | 31 // Returns true if |sequence_number| is a retransmission of a packet. |
| 29 static bool IsRetransmission(QuicSentPacketManager* sent_packet_manager, | 32 static bool IsRetransmission(QuicSentPacketManager* sent_packet_manager, |
| 30 QuicPacketSequenceNumber sequence_number); | 33 QuicPacketSequenceNumber sequence_number); |
| 31 | 34 |
| 32 static void MarkForRetransmission(QuicSentPacketManager* sent_packet_manager, | 35 static void MarkForRetransmission(QuicSentPacketManager* sent_packet_manager, |
| 33 QuicPacketSequenceNumber sequence_number, | 36 QuicPacketSequenceNumber sequence_number, |
| 34 TransmissionType transmission_type); | 37 TransmissionType transmission_type); |
| 35 | 38 |
| 36 private: | 39 private: |
| 37 DISALLOW_COPY_AND_ASSIGN(QuicSentPacketManagerPeer); | 40 DISALLOW_COPY_AND_ASSIGN(QuicSentPacketManagerPeer); |
| 38 }; | 41 }; |
| 39 | 42 |
| 40 } // namespace test | 43 } // namespace test |
| 41 | 44 |
| 42 } // namespace net | 45 } // namespace net |
| 43 | 46 |
| 44 #endif // NET_QUIC_TEST_TOOLS_QUIC_SENT_PACKET_MANAGER_PEER_H_ | 47 #endif // NET_QUIC_TEST_TOOLS_QUIC_SENT_PACKET_MANAGER_PEER_H_ |
| OLD | NEW |