OLD | NEW |
1 // Copyright (c) 2016 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2016 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_SPDY_WRITE_SCHEDULER_H_ | 5 #ifndef NET_SPDY_WRITE_SCHEDULER_H_ |
6 #define NET_SPDY_WRITE_SCHEDULER_H_ | 6 #define NET_SPDY_WRITE_SCHEDULER_H_ |
7 | 7 |
8 #include <tuple> | 8 #include <tuple> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
| 11 #include "net/base/net_export.h" |
11 #include "net/spdy/spdy_protocol.h" | 12 #include "net/spdy/spdy_protocol.h" |
12 | 13 |
13 namespace net { | 14 namespace net { |
14 | 15 |
15 // Abstract superclass for classes that decide which SPDY or HTTP/2 stream to | 16 // Abstract superclass for classes that decide which SPDY or HTTP/2 stream to |
16 // write next. Concrete subclasses implement various scheduling policies: | 17 // write next. Concrete subclasses implement various scheduling policies: |
17 // | 18 // |
18 // PriorityWriteScheduler: implements SPDY priority-based stream scheduling, | 19 // PriorityWriteScheduler: implements SPDY priority-based stream scheduling, |
19 // where (writable) higher-priority streams are always given precedence | 20 // where (writable) higher-priority streams are always given precedence |
20 // over lower-priority streams. | 21 // over lower-priority streams. |
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
141 // Returns true iff the scheduler has any ready streams. | 142 // Returns true iff the scheduler has any ready streams. |
142 virtual bool HasReadyStreams() const = 0; | 143 virtual bool HasReadyStreams() const = 0; |
143 | 144 |
144 // Returns the number of streams currently marked ready. | 145 // Returns the number of streams currently marked ready. |
145 virtual size_t NumReadyStreams() const = 0; | 146 virtual size_t NumReadyStreams() const = 0; |
146 }; | 147 }; |
147 | 148 |
148 } // namespace net | 149 } // namespace net |
149 | 150 |
150 #endif // NET_SPDY_WRITE_SCHEDULER_H_ | 151 #endif // NET_SPDY_WRITE_SCHEDULER_H_ |
OLD | NEW |