| 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 "base/hash_tables.h" | 9 #include "base/hash_tables.h" |
| 10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
| (...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 85 const IPEndPoint client_address_; | 85 const IPEndPoint client_address_; |
| 86 scoped_ptr<QuicEncryptedPacket> packet_; | 86 scoped_ptr<QuicEncryptedPacket> packet_; |
| 87 | 87 |
| 88 DISALLOW_COPY_AND_ASSIGN(QueuedPacket); | 88 DISALLOW_COPY_AND_ASSIGN(QueuedPacket); |
| 89 }; | 89 }; |
| 90 | 90 |
| 91 QuicTimeWaitListManager::QuicTimeWaitListManager( | 91 QuicTimeWaitListManager::QuicTimeWaitListManager( |
| 92 QuicPacketWriter* writer, | 92 QuicPacketWriter* writer, |
| 93 EpollServer* epoll_server) | 93 EpollServer* epoll_server) |
| 94 : framer_(kQuicVersion1, | 94 : framer_(kQuicVersion1, |
| 95 QuicDecrypter::Create(kNULL), | 95 QuicTime::Zero(), // unused |
| 96 QuicEncrypter::Create(kNULL), | |
| 97 QuicTime::Zero(), | |
| 98 true), | 96 true), |
| 99 epoll_server_(epoll_server), | 97 epoll_server_(epoll_server), |
| 100 kTimeWaitPeriod_(QuicTime::Delta::FromSeconds(kTimeWaitSeconds)), | 98 kTimeWaitPeriod_(QuicTime::Delta::FromSeconds(kTimeWaitSeconds)), |
| 101 guid_clean_up_alarm_(new GuidCleanUpAlarm(this)), | 99 guid_clean_up_alarm_(new GuidCleanUpAlarm(this)), |
| 102 clock_(epoll_server), | 100 clock_(epoll_server), |
| 103 writer_(writer), | 101 writer_(writer), |
| 104 is_write_blocked_(false) { | 102 is_write_blocked_(false) { |
| 105 framer_.set_visitor(this); | 103 framer_.set_visitor(this); |
| 106 SetGuidCleanUpAlarm(); | 104 SetGuidCleanUpAlarm(); |
| 107 } | 105 } |
| (...skipping 193 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 301 // This guid has lived its age, retire it now. | 299 // This guid has lived its age, retire it now. |
| 302 guid_map_.erase(oldest_guid->guid); | 300 guid_map_.erase(oldest_guid->guid); |
| 303 time_ordered_guid_list_.pop_front(); | 301 time_ordered_guid_list_.pop_front(); |
| 304 delete oldest_guid; | 302 delete oldest_guid; |
| 305 } | 303 } |
| 306 SetGuidCleanUpAlarm(); | 304 SetGuidCleanUpAlarm(); |
| 307 } | 305 } |
| 308 | 306 |
| 309 } // namespace tools | 307 } // namespace tools |
| 310 } // namespace net | 308 } // namespace net |
| OLD | NEW |