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 // A combined list/hash set for read or write-blocked entities. | 5 // A combined list/hash set for read or write-blocked entities. |
6 | 6 |
7 #ifndef NET_QUIC_BLOCKED_LIST_H_ | 7 #ifndef NET_QUIC_BLOCKED_LIST_H_ |
8 #define NET_QUIC_BLOCKED_LIST_H_ | 8 #define NET_QUIC_BLOCKED_LIST_H_ |
9 | 9 |
10 #include <list> | 10 #include <list> |
11 | 11 |
12 #include "base/hash_tables.h" | 12 #include "base/containers/hash_tables.h" |
13 #include "base/logging.h" | 13 #include "base/logging.h" |
14 | 14 |
15 namespace net { | 15 namespace net { |
16 | 16 |
17 template <typename Object> | 17 template <typename Object> |
18 class BlockedList { | 18 class BlockedList { |
19 public: | 19 public: |
20 // Called to add an object to the blocked list. This indicates | 20 // Called to add an object to the blocked list. This indicates |
21 // the object should be notified when it can use the socket again. | 21 // the object should be notified when it can use the socket again. |
22 // | 22 // |
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
82 // Objects are added to the back and pulled off the front, but only get | 82 // Objects are added to the back and pulled off the front, but only get |
83 // resumption calls if they're still in the set. | 83 // resumption calls if they're still in the set. |
84 // It's possible to be in the list twice, but only the first entry will get an | 84 // It's possible to be in the list twice, but only the first entry will get an |
85 // OnCanWrite call. | 85 // OnCanWrite call. |
86 std::list<Object> object_list_; | 86 std::list<Object> object_list_; |
87 }; | 87 }; |
88 | 88 |
89 } // namespace net | 89 } // namespace net |
90 | 90 |
91 #endif // NET_QUIC_BLOCKED_LIST_H_ | 91 #endif // NET_QUIC_BLOCKED_LIST_H_ |
OLD | NEW |