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

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

Issue 2002083002: Add QuicSentPacketManagerInterface, and QuicSentPacketManager implements it. No functional change e… (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 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
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 <stddef.h> 8 #include <stddef.h>
9 9
10 #include "base/macros.h" 10 #include "base/macros.h"
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
49 49
50 static void SetLossAlgorithm(QuicSentPacketManager* sent_packet_manager, 50 static void SetLossAlgorithm(QuicSentPacketManager* sent_packet_manager,
51 LossDetectionInterface* loss_detector); 51 LossDetectionInterface* loss_detector);
52 52
53 static bool HasPendingPackets( 53 static bool HasPendingPackets(
54 const QuicSentPacketManager* sent_packet_manager); 54 const QuicSentPacketManager* sent_packet_manager);
55 55
56 static QuicTime GetSentTime(const QuicSentPacketManager* sent_packet_manager, 56 static QuicTime GetSentTime(const QuicSentPacketManager* sent_packet_manager,
57 QuicPacketNumber packet_number); 57 QuicPacketNumber packet_number);
58 58
59 // Returns true if |packet_number| is a retransmission of a packet. 59 // Returns true if |packet_number| of |path_id| is a retransmission of a
60 // packet.
60 static bool IsRetransmission(QuicSentPacketManager* sent_packet_manager, 61 static bool IsRetransmission(QuicSentPacketManager* sent_packet_manager,
62 QuicPathId path_id,
61 QuicPacketNumber packet_number); 63 QuicPacketNumber packet_number);
62 64
63 static void MarkForRetransmission(QuicSentPacketManager* sent_packet_manager, 65 static void MarkForRetransmission(QuicSentPacketManager* sent_packet_manager,
66 QuicPathId path_id,
64 QuicPacketNumber packet_number, 67 QuicPacketNumber packet_number,
65 TransmissionType transmission_type); 68 TransmissionType transmission_type);
66 69
67 static QuicTime::Delta GetRetransmissionDelay( 70 static QuicTime::Delta GetRetransmissionDelay(
68 const QuicSentPacketManager* sent_packet_manager); 71 const QuicSentPacketManager* sent_packet_manager);
69 72
70 static bool HasUnackedCryptoPackets( 73 static bool HasUnackedCryptoPackets(
71 const QuicSentPacketManager* sent_packet_manager); 74 const QuicSentPacketManager* sent_packet_manager);
72 75
73 static size_t GetNumRetransmittablePackets( 76 static size_t GetNumRetransmittablePackets(
74 const QuicSentPacketManager* sent_packet_manager); 77 const QuicSentPacketManager* sent_packet_manager);
75 78
76 static QuicByteCount GetBytesInFlight( 79 static QuicByteCount GetBytesInFlight(
77 const QuicSentPacketManager* sent_packet_manager); 80 const QuicSentPacketManager* sent_packet_manager);
78 81
79 static QuicSentPacketManager::NetworkChangeVisitor* GetNetworkChangeVisitor( 82 static QuicSentPacketManagerInterface::NetworkChangeVisitor*
80 const QuicSentPacketManager* sent_packet_manager); 83 GetNetworkChangeVisitor(const QuicSentPacketManager* sent_packet_manager);
81 84
82 static void SetConsecutiveRtoCount(QuicSentPacketManager* sent_packet_manager, 85 static void SetConsecutiveRtoCount(QuicSentPacketManager* sent_packet_manager,
83 size_t count); 86 size_t count);
84 87
85 static void SetConsecutiveTlpCount(QuicSentPacketManager* sent_packet_manager, 88 static void SetConsecutiveTlpCount(QuicSentPacketManager* sent_packet_manager,
86 size_t count); 89 size_t count);
87 90
88 static QuicSustainedBandwidthRecorder& GetBandwidthRecorder( 91 static QuicSustainedBandwidthRecorder& GetBandwidthRecorder(
89 QuicSentPacketManager* sent_packet_manager); 92 QuicSentPacketManager* sent_packet_manager);
90 93
94 static bool UsingPacing(const QuicSentPacketManager* sent_packet_manager);
95
91 private: 96 private:
92 DISALLOW_COPY_AND_ASSIGN(QuicSentPacketManagerPeer); 97 DISALLOW_COPY_AND_ASSIGN(QuicSentPacketManagerPeer);
93 }; 98 };
94 99
95 } // namespace test 100 } // namespace test
96 101
97 } // namespace net 102 } // namespace net
98 103
99 #endif // NET_QUIC_TEST_TOOLS_QUIC_SENT_PACKET_MANAGER_PEER_H_ 104 #endif // NET_QUIC_TEST_TOOLS_QUIC_SENT_PACKET_MANAGER_PEER_H_
OLDNEW
« no previous file with comments | « net/quic/test_tools/quic_connection_peer.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