OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_CONNECTION_PEER_H_ | 5 #ifndef NET_QUIC_TEST_TOOLS_QUIC_CONNECTION_PEER_H_ |
6 #define NET_QUIC_TEST_TOOLS_QUIC_CONNECTION_PEER_H_ | 6 #define NET_QUIC_TEST_TOOLS_QUIC_CONNECTION_PEER_H_ |
7 | 7 |
8 #include "base/macros.h" | 8 #include "base/macros.h" |
9 #include "net/base/ip_endpoint.h" | 9 #include "net/base/ip_endpoint.h" |
10 #include "net/quic/quic_connection.h" | 10 #include "net/quic/quic_connection.h" |
(...skipping 17 matching lines...) Expand all Loading... |
28 class QuicSentPacketManager; | 28 class QuicSentPacketManager; |
29 class SendAlgorithmInterface; | 29 class SendAlgorithmInterface; |
30 | 30 |
31 namespace test { | 31 namespace test { |
32 | 32 |
33 // Peer to make public a number of otherwise private QuicConnection methods. | 33 // Peer to make public a number of otherwise private QuicConnection methods. |
34 class QuicConnectionPeer { | 34 class QuicConnectionPeer { |
35 public: | 35 public: |
36 static void SendAck(QuicConnection* connection); | 36 static void SendAck(QuicConnection* connection); |
37 | 37 |
| 38 // Sets send algorithm of |path_id|. |
38 static void SetSendAlgorithm(QuicConnection* connection, | 39 static void SetSendAlgorithm(QuicConnection* connection, |
| 40 QuicPathId path_id, |
39 SendAlgorithmInterface* send_algorithm); | 41 SendAlgorithmInterface* send_algorithm); |
40 | 42 |
| 43 // Sets loss algorithm of |path_id|. |
| 44 static void SetLossAlgorithm(QuicConnection* connection, |
| 45 QuicPathId path_id, |
| 46 LossDetectionInterface* loss_algorithm); |
| 47 |
41 static const QuicFrame GetUpdatedAckFrame(QuicConnection* connection); | 48 static const QuicFrame GetUpdatedAckFrame(QuicConnection* connection); |
42 | 49 |
43 static void PopulateStopWaitingFrame(QuicConnection* connection, | 50 static void PopulateStopWaitingFrame(QuicConnection* connection, |
44 QuicStopWaitingFrame* stop_waiting); | 51 QuicStopWaitingFrame* stop_waiting); |
45 | 52 |
46 static QuicConnectionVisitorInterface* GetVisitor(QuicConnection* connection); | 53 static QuicConnectionVisitorInterface* GetVisitor(QuicConnection* connection); |
47 | 54 |
48 static QuicPacketCreator* GetPacketCreator(QuicConnection* connection); | 55 static QuicPacketCreator* GetPacketCreator(QuicConnection* connection); |
49 | 56 |
50 static QuicPacketGenerator* GetPacketGenerator(QuicConnection* connection); | 57 static QuicPacketGenerator* GetPacketGenerator(QuicConnection* connection); |
51 | 58 |
52 static QuicSentPacketManager* GetSentPacketManager( | 59 // Returns sent packet manager of |path_id|. |
53 QuicConnection* connection); | 60 static QuicSentPacketManager* GetSentPacketManager(QuicConnection* connection, |
| 61 QuicPathId path_id); |
54 | 62 |
55 static QuicTime::Delta GetNetworkTimeout(QuicConnection* connection); | 63 static QuicTime::Delta GetNetworkTimeout(QuicConnection* connection); |
56 | 64 |
57 static QuicSentEntropyManager* GetSentEntropyManager( | 65 static QuicSentEntropyManager* GetSentEntropyManager( |
58 QuicConnection* connection); | 66 QuicConnection* connection); |
59 | 67 |
60 static QuicPacketEntropyHash GetSentEntropyHash( | 68 static QuicPacketEntropyHash GetSentEntropyHash( |
61 QuicConnection* connection, | 69 QuicConnection* connection, |
62 QuicPacketNumber packet_number); | 70 QuicPacketNumber packet_number); |
63 | 71 |
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
126 | 134 |
127 private: | 135 private: |
128 DISALLOW_COPY_AND_ASSIGN(QuicConnectionPeer); | 136 DISALLOW_COPY_AND_ASSIGN(QuicConnectionPeer); |
129 }; | 137 }; |
130 | 138 |
131 } // namespace test | 139 } // namespace test |
132 | 140 |
133 } // namespace net | 141 } // namespace net |
134 | 142 |
135 #endif // NET_QUIC_TEST_TOOLS_QUIC_CONNECTION_PEER_H_ | 143 #endif // NET_QUIC_TEST_TOOLS_QUIC_CONNECTION_PEER_H_ |
OLD | NEW |