| 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/basictypes.h" | 8 #include "base/basictypes.h" |
| 9 #include "net/base/ip_endpoint.h" | 9 #include "net/base/ip_endpoint.h" |
| 10 #include "net/quic/quic_connection_stats.h" | 10 #include "net/quic/quic_connection_stats.h" |
| 11 #include "net/quic/quic_protocol.h" | 11 #include "net/quic/quic_protocol.h" |
| 12 | 12 |
| 13 namespace net { | 13 namespace net { |
| 14 | 14 |
| 15 struct QuicAckFrame; | 15 struct QuicAckFrame; |
| 16 struct QuicPacketHeader; | 16 struct QuicPacketHeader; |
| 17 class QuicAlarm; | 17 class QuicAlarm; |
| 18 class QuicConnection; | 18 class QuicConnection; |
| 19 class QuicConnectionHelperInterface; | 19 class QuicConnectionHelperInterface; |
| 20 class QuicConnectionVisitorInterface; | 20 class QuicConnectionVisitorInterface; |
| 21 class QuicEncryptedPacket; | 21 class QuicEncryptedPacket; |
| 22 class QuicFecGroup; | 22 class QuicFecGroup; |
| 23 class QuicFramer; | 23 class QuicFramer; |
| 24 class QuicPacketCreator; | 24 class QuicPacketCreator; |
| 25 class QuicPacketGenerator; | 25 class QuicPacketGenerator; |
| 26 class QuicPacketWriter; | 26 class QuicPacketWriter; |
| 27 class QuicReceivedPacketManager; | 27 class QuicReceivedPacketManager; |
| 28 class QuicSentPacketManager; | 28 class QuicSentPacketManager; |
| 29 class ReceiveAlgorithmInterface; | |
| 30 class SendAlgorithmInterface; | 29 class SendAlgorithmInterface; |
| 31 | 30 |
| 32 namespace test { | 31 namespace test { |
| 33 | 32 |
| 34 // Peer to make public a number of otherwise private QuicConnection methods. | 33 // Peer to make public a number of otherwise private QuicConnection methods. |
| 35 class QuicConnectionPeer { | 34 class QuicConnectionPeer { |
| 36 public: | 35 public: |
| 37 static void SendAck(QuicConnection* connection); | 36 static void SendAck(QuicConnection* connection); |
| 38 | 37 |
| 39 static void SetReceiveAlgorithm(QuicConnection* connection, | |
| 40 ReceiveAlgorithmInterface* receive_algorithm); | |
| 41 | |
| 42 static void SetSendAlgorithm(QuicConnection* connection, | 38 static void SetSendAlgorithm(QuicConnection* connection, |
| 43 SendAlgorithmInterface* send_algorithm); | 39 SendAlgorithmInterface* send_algorithm); |
| 44 | 40 |
| 45 static QuicAckFrame* CreateAckFrame(QuicConnection* connection); | 41 static void PopulateAckFrame(QuicConnection* connection, QuicAckFrame* ack); |
| 46 | 42 |
| 47 static QuicStopWaitingFrame* CreateStopWaitingFrame( | 43 static void PopulateStopWaitingFrame(QuicConnection* connection, |
| 48 QuicConnection* connection); | 44 QuicStopWaitingFrame* stop_waiting); |
| 49 | 45 |
| 50 static QuicConnectionVisitorInterface* GetVisitor( | 46 static QuicConnectionVisitorInterface* GetVisitor( |
| 51 QuicConnection* connection); | 47 QuicConnection* connection); |
| 52 | 48 |
| 53 static QuicPacketCreator* GetPacketCreator(QuicConnection* connection); | 49 static QuicPacketCreator* GetPacketCreator(QuicConnection* connection); |
| 54 | 50 |
| 55 static QuicPacketGenerator* GetPacketGenerator(QuicConnection* connection); | 51 static QuicPacketGenerator* GetPacketGenerator(QuicConnection* connection); |
| 56 | 52 |
| 57 static QuicSentPacketManager* GetSentPacketManager( | 53 static QuicSentPacketManager* GetSentPacketManager( |
| 58 QuicConnection* connection); | 54 QuicConnection* connection); |
| (...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 131 | 127 |
| 132 private: | 128 private: |
| 133 DISALLOW_COPY_AND_ASSIGN(QuicConnectionPeer); | 129 DISALLOW_COPY_AND_ASSIGN(QuicConnectionPeer); |
| 134 }; | 130 }; |
| 135 | 131 |
| 136 } // namespace test | 132 } // namespace test |
| 137 | 133 |
| 138 } // namespace net | 134 } // namespace net |
| 139 | 135 |
| 140 #endif // NET_QUIC_TEST_TOOLS_QUIC_CONNECTION_PEER_H_ | 136 #endif // NET_QUIC_TEST_TOOLS_QUIC_CONNECTION_PEER_H_ |
| OLD | NEW |