| OLD | NEW |
| 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 #include "net/tools/quic/quic_time_wait_list_manager.h" | 5 #include "net/tools/quic/quic_time_wait_list_manager.h" |
| 6 | 6 |
| 7 #include <errno.h> | 7 #include <errno.h> |
| 8 #include <memory> | 8 #include <memory> |
| 9 #include <ostream> | 9 #include <ostream> |
| 10 | 10 |
| (...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 118 QuicPacketNumber packet_number) { | 118 QuicPacketNumber packet_number) { |
| 119 QuicEncryptedPacket packet(nullptr, 0); | 119 QuicEncryptedPacket packet(nullptr, 0); |
| 120 time_wait_list_manager_.ProcessPacket(server_address_, client_address_, | 120 time_wait_list_manager_.ProcessPacket(server_address_, client_address_, |
| 121 connection_id, packet_number, packet); | 121 connection_id, packet_number, packet); |
| 122 } | 122 } |
| 123 | 123 |
| 124 QuicEncryptedPacket* ConstructEncryptedPacket( | 124 QuicEncryptedPacket* ConstructEncryptedPacket( |
| 125 QuicConnectionId connection_id, | 125 QuicConnectionId connection_id, |
| 126 QuicPacketNumber packet_number) { | 126 QuicPacketNumber packet_number) { |
| 127 return net::test::ConstructEncryptedPacket(connection_id, false, false, | 127 return net::test::ConstructEncryptedPacket(connection_id, false, false, |
| 128 false, packet_number, "data"); | 128 packet_number, "data"); |
| 129 } | 129 } |
| 130 | 130 |
| 131 QuicFlagSaver flags_; // Save/restore all QUIC flag values. | 131 QuicFlagSaver flags_; // Save/restore all QUIC flag values. |
| 132 NiceMock<MockFakeTimeEpollServer> epoll_server_; | 132 NiceMock<MockFakeTimeEpollServer> epoll_server_; |
| 133 QuicEpollConnectionHelper helper_; | 133 QuicEpollConnectionHelper helper_; |
| 134 QuicEpollAlarmFactory alarm_factory_; | 134 QuicEpollAlarmFactory alarm_factory_; |
| 135 StrictMock<MockPacketWriter> writer_; | 135 StrictMock<MockPacketWriter> writer_; |
| 136 StrictMock<MockQuicSessionVisitor> visitor_; | 136 StrictMock<MockQuicSessionVisitor> visitor_; |
| 137 QuicTimeWaitListManager time_wait_list_manager_; | 137 QuicTimeWaitListManager time_wait_list_manager_; |
| 138 QuicConnectionId connection_id_; | 138 QuicConnectionId connection_id_; |
| (...skipping 383 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 522 EXPECT_EQ(static_cast<size_t>(FLAGS_quic_time_wait_list_max_connections), | 522 EXPECT_EQ(static_cast<size_t>(FLAGS_quic_time_wait_list_max_connections), |
| 523 time_wait_list_manager_.num_connections()); | 523 time_wait_list_manager_.num_connections()); |
| 524 EXPECT_FALSE(IsConnectionIdInTimeWait(id_to_evict)); | 524 EXPECT_FALSE(IsConnectionIdInTimeWait(id_to_evict)); |
| 525 EXPECT_TRUE(IsConnectionIdInTimeWait(current_connection_id)); | 525 EXPECT_TRUE(IsConnectionIdInTimeWait(current_connection_id)); |
| 526 } | 526 } |
| 527 } | 527 } |
| 528 | 528 |
| 529 } // namespace | 529 } // namespace |
| 530 } // namespace test | 530 } // namespace test |
| 531 } // namespace net | 531 } // namespace net |
| OLD | NEW |