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" |
11 #include "base/stl_util.h" | 11 #include "base/stl_util.h" |
12 #include "net/base/ip_endpoint.h" | 12 #include "net/base/ip_endpoint.h" |
13 #include "net/quic/crypto/crypto_protocol.h" | 13 #include "net/quic/crypto/crypto_protocol.h" |
14 #include "net/quic/crypto/quic_decrypter.h" | 14 #include "net/quic/crypto/quic_decrypter.h" |
15 #include "net/quic/crypto/quic_encrypter.h" | 15 #include "net/quic/crypto/quic_encrypter.h" |
16 #include "net/quic/quic_clock.h" | 16 #include "net/quic/quic_clock.h" |
17 #include "net/quic/quic_framer.h" | 17 #include "net/quic/quic_framer.h" |
18 #include "net/quic/quic_protocol.h" | 18 #include "net/quic/quic_protocol.h" |
19 #include "net/quic/quic_utils.h" | 19 #include "net/quic/quic_utils.h" |
20 | 20 |
21 namespace net { | 21 namespace net { |
| 22 namespace tools { |
22 | 23 |
23 namespace { | 24 namespace { |
24 | 25 |
25 // Time period for which the guid should live in time wait state.. | 26 // Time period for which the guid should live in time wait state.. |
26 const int kTimeWaitSeconds = 5; | 27 const int kTimeWaitSeconds = 5; |
27 | 28 |
28 } // namespace | 29 } // namespace |
29 | 30 |
30 // A very simple alarm that just informs the QuicTimeWaitListManager to clean | 31 // A very simple alarm that just informs the QuicTimeWaitListManager to clean |
31 // up old guids. This alarm should be unregistered and deleted before the | 32 // up old guids. This alarm should be unregistered and deleted before the |
(...skipping 239 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
271 break; | 272 break; |
272 } | 273 } |
273 // This guid has lived its age, retire it now. | 274 // This guid has lived its age, retire it now. |
274 guid_map_.erase(oldest_guid->guid); | 275 guid_map_.erase(oldest_guid->guid); |
275 time_ordered_guid_list_.pop_front(); | 276 time_ordered_guid_list_.pop_front(); |
276 delete oldest_guid; | 277 delete oldest_guid; |
277 } | 278 } |
278 SetGuidCleanUpAlarm(); | 279 SetGuidCleanUpAlarm(); |
279 } | 280 } |
280 | 281 |
| 282 } // namespace tools |
281 } // namespace net | 283 } // namespace net |
OLD | NEW |