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