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_QUIC_TEST_TOOLS_QUIC_TEST_UTILS_H_ | 7 #ifndef NET_QUIC_TEST_TOOLS_QUIC_TEST_UTILS_H_ |
8 #define NET_QUIC_TEST_TOOLS_QUIC_TEST_UTILS_H_ | 8 #define NET_QUIC_TEST_TOOLS_QUIC_TEST_UTILS_H_ |
9 | 9 |
10 #include <string> | 10 #include <string> |
(...skipping 313 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
324 | 324 |
325 class PacketSavingConnection : public MockConnection { | 325 class PacketSavingConnection : public MockConnection { |
326 public: | 326 public: |
327 explicit PacketSavingConnection(bool is_server); | 327 explicit PacketSavingConnection(bool is_server); |
328 | 328 |
329 PacketSavingConnection(bool is_server, | 329 PacketSavingConnection(bool is_server, |
330 const QuicVersionVector& supported_versions); | 330 const QuicVersionVector& supported_versions); |
331 | 331 |
332 virtual ~PacketSavingConnection(); | 332 virtual ~PacketSavingConnection(); |
333 | 333 |
334 virtual bool SendOrQueuePacket(EncryptionLevel level, | 334 virtual void SendOrQueuePacket(EncryptionLevel level, |
335 const SerializedPacket& packet, | 335 const SerializedPacket& packet, |
336 TransmissionType transmission_type) OVERRIDE; | 336 TransmissionType transmission_type) OVERRIDE; |
337 | 337 |
338 std::vector<QuicPacket*> packets_; | 338 std::vector<QuicPacket*> packets_; |
339 std::vector<QuicEncryptedPacket*> encrypted_packets_; | 339 std::vector<QuicEncryptedPacket*> encrypted_packets_; |
340 | 340 |
341 private: | 341 private: |
342 DISALLOW_COPY_AND_ASSIGN(PacketSavingConnection); | 342 DISALLOW_COPY_AND_ASSIGN(PacketSavingConnection); |
343 }; | 343 }; |
344 | 344 |
(...skipping 238 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
583 // clears the pointer to it to prevent use-after-free. | 583 // clears the pointer to it to prevent use-after-free. |
584 void Unregister(PerConnectionPacketWriter* writer); | 584 void Unregister(PerConnectionPacketWriter* writer); |
585 | 585 |
586 PerConnectionPacketWriter* current_writer_; | 586 PerConnectionPacketWriter* current_writer_; |
587 }; | 587 }; |
588 | 588 |
589 } // namespace test | 589 } // namespace test |
590 } // namespace net | 590 } // namespace net |
591 | 591 |
592 #endif // NET_QUIC_TEST_TOOLS_QUIC_TEST_UTILS_H_ | 592 #endif // NET_QUIC_TEST_TOOLS_QUIC_TEST_UTILS_H_ |
OLD | NEW |