| 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 // Common utilities for Quic tests | 5 // Common utilities for Quic tests |
| 6 | 6 |
| 7 #ifndef NET_TOOLS_QUIC_TEST_TOOLS_QUIC_TEST_UTILS_H_ | 7 #ifndef NET_TOOLS_QUIC_TEST_TOOLS_QUIC_TEST_UTILS_H_ |
| 8 #define NET_TOOLS_QUIC_TEST_TOOLS_QUIC_TEST_UTILS_H_ | 8 #define NET_TOOLS_QUIC_TEST_TOOLS_QUIC_TEST_UTILS_H_ |
| 9 | 9 |
| 10 #include <string> | 10 #include <string> |
| (...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 99 | 99 |
| 100 MOCK_METHOD3(OnAckNotification, | 100 MOCK_METHOD3(OnAckNotification, |
| 101 void(int num_retransmitted_packets, | 101 void(int num_retransmitted_packets, |
| 102 int num_retransmitted_bytes, | 102 int num_retransmitted_bytes, |
| 103 QuicTime::Delta delta_largest_observed)); | 103 QuicTime::Delta delta_largest_observed)); |
| 104 | 104 |
| 105 protected: | 105 protected: |
| 106 // Object is ref counted. | 106 // Object is ref counted. |
| 107 virtual ~MockAckNotifierDelegate(); | 107 virtual ~MockAckNotifierDelegate(); |
| 108 | 108 |
| 109 private: |
| 109 DISALLOW_COPY_AND_ASSIGN(MockAckNotifierDelegate); | 110 DISALLOW_COPY_AND_ASSIGN(MockAckNotifierDelegate); |
| 110 }; | 111 }; |
| 111 | 112 |
| 112 // Creates per-connection packet writers that register themselves with the | 113 // Creates per-connection packet writers that register themselves with the |
| 113 // TestWriterFactory on each write so that TestWriterFactory::OnPacketSent can | 114 // TestWriterFactory on each write so that TestWriterFactory::OnPacketSent can |
| 114 // be routed to the appropriate QuicConnection. | 115 // be routed to the appropriate QuicConnection. |
| 115 class TestWriterFactory : public QuicDispatcher::PacketWriterFactory { | 116 class TestWriterFactory : public QuicDispatcher::PacketWriterFactory { |
| 116 public: | 117 public: |
| 117 TestWriterFactory(); | 118 TestWriterFactory(); |
| 118 ~TestWriterFactory() override; | 119 ~TestWriterFactory() override; |
| (...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 175 QuicConnectionId connection_id, | 176 QuicConnectionId connection_id, |
| 176 QuicPacketSequenceNumber sequence_number, | 177 QuicPacketSequenceNumber sequence_number, |
| 177 const QuicEncryptedPacket& packet)); | 178 const QuicEncryptedPacket& packet)); |
| 178 }; | 179 }; |
| 179 | 180 |
| 180 } // namespace test | 181 } // namespace test |
| 181 } // namespace tools | 182 } // namespace tools |
| 182 } // namespace net | 183 } // namespace net |
| 183 | 184 |
| 184 #endif // NET_TOOLS_QUIC_TEST_TOOLS_QUIC_TEST_UTILS_H_ | 185 #endif // NET_TOOLS_QUIC_TEST_TOOLS_QUIC_TEST_UTILS_H_ |
| OLD | NEW |