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

Side by Side Diff: net/quic/test_tools/quic_sent_packet_manager_peer.h

Issue 185053006: Refactor of QUIC's rtt storage and calculation to have a single RttStats (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 9 months 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 | Annotate | Revision Log
OLDNEW
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 SetMaxTailLossProbes( 19 static void SetMaxTailLossProbes(
20 QuicSentPacketManager* sent_packet_manager, size_t max_tail_loss_probes); 20 QuicSentPacketManager* sent_packet_manager, size_t max_tail_loss_probes);
21 21
22 static void SetSendAlgorithm(QuicSentPacketManager* sent_packet_manager, 22 static void SetSendAlgorithm(QuicSentPacketManager* sent_packet_manager,
23 SendAlgorithmInterface* send_algorithm); 23 SendAlgorithmInterface* send_algorithm);
24 24
25 static void SetLossAlgorithm(QuicSentPacketManager* sent_packet_manager, 25 static void SetLossAlgorithm(QuicSentPacketManager* sent_packet_manager,
26 LossDetectionInterface* loss_detector); 26 LossDetectionInterface* loss_detector);
27 27
28 static RttStats* GetRttStats(QuicSentPacketManager* sent_packet_manager);
29
28 static size_t GetNackCount( 30 static size_t GetNackCount(
29 const QuicSentPacketManager* sent_packet_manager, 31 const QuicSentPacketManager* sent_packet_manager,
30 QuicPacketSequenceNumber sequence_number); 32 QuicPacketSequenceNumber sequence_number);
31 33
32 static size_t GetPendingRetransmissionCount( 34 static size_t GetPendingRetransmissionCount(
33 const QuicSentPacketManager* sent_packet_manager); 35 const QuicSentPacketManager* sent_packet_manager);
34 36
35 static bool HasPendingPackets( 37 static bool HasPendingPackets(
36 const QuicSentPacketManager* sent_packet_manager); 38 const QuicSentPacketManager* sent_packet_manager);
37 39
38 static QuicTime GetSentTime(const QuicSentPacketManager* sent_packet_manager, 40 static QuicTime GetSentTime(const QuicSentPacketManager* sent_packet_manager,
39 QuicPacketSequenceNumber sequence_number); 41 QuicPacketSequenceNumber sequence_number);
40 42
41 static QuicTime::Delta rtt(QuicSentPacketManager* sent_packet_manager);
42
43 // Returns true if |sequence_number| is a retransmission of a packet. 43 // Returns true if |sequence_number| is a retransmission of a packet.
44 static bool IsRetransmission(QuicSentPacketManager* sent_packet_manager, 44 static bool IsRetransmission(QuicSentPacketManager* sent_packet_manager,
45 QuicPacketSequenceNumber sequence_number); 45 QuicPacketSequenceNumber sequence_number);
46 46
47 static void MarkForRetransmission(QuicSentPacketManager* sent_packet_manager, 47 static void MarkForRetransmission(QuicSentPacketManager* sent_packet_manager,
48 QuicPacketSequenceNumber sequence_number, 48 QuicPacketSequenceNumber sequence_number,
49 TransmissionType transmission_type); 49 TransmissionType transmission_type);
50 50
51 static QuicTime::Delta GetRetransmissionDelay( 51 static QuicTime::Delta GetRetransmissionDelay(
52 const QuicSentPacketManager* sent_packet_manager); 52 const QuicSentPacketManager* sent_packet_manager);
53 53
54 static bool HasUnackedCryptoPackets( 54 static bool HasUnackedCryptoPackets(
55 const QuicSentPacketManager* sent_packet_manager); 55 const QuicSentPacketManager* sent_packet_manager);
56 56
57 static size_t GetNumRetransmittablePackets( 57 static size_t GetNumRetransmittablePackets(
58 const QuicSentPacketManager* sent_packet_manager); 58 const QuicSentPacketManager* sent_packet_manager);
59 59
60 static SequenceNumberSet GetUnackedPackets( 60 static SequenceNumberSet GetUnackedPackets(
61 const QuicSentPacketManager* sent_packet_manager); 61 const QuicSentPacketManager* sent_packet_manager);
62 62
63 private: 63 private:
64 DISALLOW_COPY_AND_ASSIGN(QuicSentPacketManagerPeer); 64 DISALLOW_COPY_AND_ASSIGN(QuicSentPacketManagerPeer);
65 }; 65 };
66 66
67 } // namespace test 67 } // namespace test
68 68
69 } // namespace net 69 } // namespace net
70 70
71 #endif // NET_QUIC_TEST_TOOLS_QUIC_SENT_PACKET_MANAGER_PEER_H_ 71 #endif // NET_QUIC_TEST_TOOLS_QUIC_SENT_PACKET_MANAGER_PEER_H_
OLDNEW
« no previous file with comments | « net/quic/quic_sent_packet_manager_test.cc ('k') | net/quic/test_tools/quic_sent_packet_manager_peer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698