Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(121)

Side by Side Diff: net/quic/quic_ack_notifier_manager.h

Issue 612323010: Align base::hash_map with C++11. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Try a different tack for C++ insanity Created 6 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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)
14 namespace BASE_HASH_NAMESPACE {
15 template<>
16 struct hash<net::QuicAckNotifier*> {
17 std::size_t operator()(const net::QuicAckNotifier* ptr) const {
18 return hash<size_t>()(reinterpret_cast<size_t>(ptr));
19 }
20 };
21 }
22 #endif
23
24 namespace net { 13 namespace net {
25 14
26 class QuicAckNotifier; 15 class QuicAckNotifier;
27 16
28 // The AckNotifierManager is used by the QuicSentPacketManager to keep track of 17 // The AckNotifierManager is used by the QuicSentPacketManager to keep track of
29 // all the AckNotifiers currently active. It owns the AckNotifiers which it gets 18 // all the AckNotifiers currently active. It owns the AckNotifiers which it gets
30 // from the serialized packets passed into OnSerializedPacket. It maintains both 19 // from the serialized packets passed into OnSerializedPacket. It maintains both
31 // a set of AckNotifiers and a map from sequence number to AckNotifier the sake 20 // a set of AckNotifiers and a map from sequence number to AckNotifier the sake
32 // of efficiency - we can quickly check the map to see if any AckNotifiers are 21 // of efficiency - we can quickly check the map to see if any AckNotifiers are
33 // interested in a given sequence number. 22 // interested in a given sequence number.
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
71 // number, call OnAck for all mapped AckNotifiers. 60 // number, call OnAck for all mapped AckNotifiers.
72 // Does not own the AckNotifiers. 61 // Does not own the AckNotifiers.
73 AckNotifierMap ack_notifier_map_; 62 AckNotifierMap ack_notifier_map_;
74 63
75 DISALLOW_COPY_AND_ASSIGN(AckNotifierManager); 64 DISALLOW_COPY_AND_ASSIGN(AckNotifierManager);
76 }; 65 };
77 66
78 } // namespace net 67 } // namespace net
79 68
80 #endif // NET_QUIC_QUIC_ACK_NOTIFIER_MANAGER_H_ 69 #endif // NET_QUIC_QUIC_ACK_NOTIFIER_MANAGER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698