| 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 #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 | 9 |
| 9 #include "base/logging.h" | 10 #include "base/logging.h" |
| 10 #include "base/macros.h" | 11 #include "base/macros.h" |
| 11 #include "base/memory/scoped_ptr.h" | |
| 12 #include "base/stl_util.h" | 12 #include "base/stl_util.h" |
| 13 #include "net/base/ip_endpoint.h" | 13 #include "net/base/ip_endpoint.h" |
| 14 #include "net/quic/crypto/crypto_protocol.h" | 14 #include "net/quic/crypto/crypto_protocol.h" |
| 15 #include "net/quic/crypto/quic_decrypter.h" | 15 #include "net/quic/crypto/quic_decrypter.h" |
| 16 #include "net/quic/crypto/quic_encrypter.h" | 16 #include "net/quic/crypto/quic_encrypter.h" |
| 17 #include "net/quic/quic_clock.h" | 17 #include "net/quic/quic_clock.h" |
| 18 #include "net/quic/quic_flags.h" | 18 #include "net/quic/quic_flags.h" |
| 19 #include "net/quic/quic_framer.h" | 19 #include "net/quic/quic_framer.h" |
| 20 #include "net/quic/quic_protocol.h" | 20 #include "net/quic/quic_protocol.h" |
| 21 #include "net/quic/quic_utils.h" | 21 #include "net/quic/quic_utils.h" |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 61 client_address_(client_address), | 61 client_address_(client_address), |
| 62 packet_(packet) {} | 62 packet_(packet) {} |
| 63 | 63 |
| 64 const IPEndPoint& server_address() const { return server_address_; } | 64 const IPEndPoint& server_address() const { return server_address_; } |
| 65 const IPEndPoint& client_address() const { return client_address_; } | 65 const IPEndPoint& client_address() const { return client_address_; } |
| 66 QuicEncryptedPacket* packet() { return packet_.get(); } | 66 QuicEncryptedPacket* packet() { return packet_.get(); } |
| 67 | 67 |
| 68 private: | 68 private: |
| 69 const IPEndPoint server_address_; | 69 const IPEndPoint server_address_; |
| 70 const IPEndPoint client_address_; | 70 const IPEndPoint client_address_; |
| 71 scoped_ptr<QuicEncryptedPacket> packet_; | 71 std::unique_ptr<QuicEncryptedPacket> packet_; |
| 72 | 72 |
| 73 DISALLOW_COPY_AND_ASSIGN(QueuedPacket); | 73 DISALLOW_COPY_AND_ASSIGN(QueuedPacket); |
| 74 }; | 74 }; |
| 75 | 75 |
| 76 QuicTimeWaitListManager::QuicTimeWaitListManager( | 76 QuicTimeWaitListManager::QuicTimeWaitListManager( |
| 77 QuicPacketWriter* writer, | 77 QuicPacketWriter* writer, |
| 78 QuicServerSessionVisitor* visitor, | 78 QuicServerSessionVisitor* visitor, |
| 79 QuicConnectionHelperInterface* helper) | 79 QuicConnectionHelperInterface* helper) |
| 80 : time_wait_period_( | 80 : time_wait_period_( |
| 81 QuicTime::Delta::FromSeconds(FLAGS_quic_time_wait_list_seconds)), | 81 QuicTime::Delta::FromSeconds(FLAGS_quic_time_wait_list_seconds)), |
| (...skipping 251 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 333 version(version_), | 333 version(version_), |
| 334 time_added(time_added_), | 334 time_added(time_added_), |
| 335 connection_rejected_statelessly(connection_rejected_statelessly) {} | 335 connection_rejected_statelessly(connection_rejected_statelessly) {} |
| 336 | 336 |
| 337 QuicTimeWaitListManager::ConnectionIdData::ConnectionIdData( | 337 QuicTimeWaitListManager::ConnectionIdData::ConnectionIdData( |
| 338 const ConnectionIdData& other) = default; | 338 const ConnectionIdData& other) = default; |
| 339 | 339 |
| 340 QuicTimeWaitListManager::ConnectionIdData::~ConnectionIdData() {} | 340 QuicTimeWaitListManager::ConnectionIdData::~ConnectionIdData() {} |
| 341 | 341 |
| 342 } // namespace net | 342 } // namespace net |
| OLD | NEW |