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 #ifndef NET_QUIC_QUIC_ACK_NOTIFIER_MANAGER_H_ | 5 #ifndef NET_QUIC_QUIC_ACK_NOTIFIER_MANAGER_H_ |
6 #define NET_QUIC_QUIC_ACK_NOTIFIER_MANAGER_H_ | 6 #define NET_QUIC_QUIC_ACK_NOTIFIER_MANAGER_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 | 9 |
10 #include "base/containers/hash_tables.h" | 10 #include "base/containers/hash_tables.h" |
11 #include "net/quic/quic_protocol.h" | 11 #include "net/quic/quic_protocol.h" |
12 | 12 |
13 #if defined(COMPILER_GCC) | 13 #if defined(COMPILER_GCC) |
14 namespace BASE_HASH_NAMESPACE { | 14 namespace BASE_HASH_NAMESPACE { |
15 template<> | 15 template <> |
16 struct hash<net::QuicAckNotifier*> { | 16 struct hash<net::QuicAckNotifier*> { |
17 std::size_t operator()(const net::QuicAckNotifier* ptr) const { | 17 std::size_t operator()(const net::QuicAckNotifier* ptr) const { |
18 return hash<size_t>()(reinterpret_cast<size_t>(ptr)); | 18 return hash<size_t>()(reinterpret_cast<size_t>(ptr)); |
19 } | 19 } |
20 }; | 20 }; |
21 } | 21 } |
22 #endif | 22 #endif |
23 | 23 |
24 namespace net { | 24 namespace net { |
25 | 25 |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
71 // number, call OnAck for all mapped AckNotifiers. | 71 // number, call OnAck for all mapped AckNotifiers. |
72 // Does not own the AckNotifiers. | 72 // Does not own the AckNotifiers. |
73 AckNotifierMap ack_notifier_map_; | 73 AckNotifierMap ack_notifier_map_; |
74 | 74 |
75 DISALLOW_COPY_AND_ASSIGN(AckNotifierManager); | 75 DISALLOW_COPY_AND_ASSIGN(AckNotifierManager); |
76 }; | 76 }; |
77 | 77 |
78 } // namespace net | 78 } // namespace net |
79 | 79 |
80 #endif // NET_QUIC_QUIC_ACK_NOTIFIER_MANAGER_H_ | 80 #endif // NET_QUIC_QUIC_ACK_NOTIFIER_MANAGER_H_ |
OLD | NEW |