OLD | NEW |
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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/flip_server/output_ordering.h" | 5 #include "net/tools/flip_server/output_ordering.h" |
6 | 6 |
7 #include <utility> | 7 #include <utility> |
8 | 8 |
9 #include "net/tools/flip_server/flip_config.h" | 9 #include "net/tools/flip_server/flip_config.h" |
10 #include "net/tools/flip_server/sm_connection.h" | 10 #include "net/tools/flip_server/sm_connection.h" |
11 | 11 |
12 | 12 |
13 namespace net { | 13 namespace net { |
14 | 14 |
15 OutputOrdering::PriorityMapPointer::PriorityMapPointer() | 15 OutputOrdering::PriorityMapPointer::PriorityMapPointer() |
16 : ring(NULL), | 16 : ring(NULL), |
17 alarm_enabled(false) { | 17 alarm_enabled(false) { |
18 } | 18 } |
19 | 19 |
| 20 OutputOrdering::PriorityMapPointer::~PriorityMapPointer() {} |
| 21 |
20 // static | 22 // static |
21 double OutputOrdering::server_think_time_in_s_ = 0.0; | 23 double OutputOrdering::server_think_time_in_s_ = 0.0; |
22 | 24 |
23 OutputOrdering::OutputOrdering(SMConnectionInterface* connection) | 25 OutputOrdering::OutputOrdering(SMConnectionInterface* connection) |
24 : first_data_senders_threshold_(kInitialDataSendersThreshold), | 26 : first_data_senders_threshold_(kInitialDataSendersThreshold), |
25 connection_(connection) { | 27 connection_(connection) { |
26 if (connection) | 28 if (connection) |
27 epoll_server_ = connection->epoll_server(); | 29 epoll_server_ = connection->epoll_server(); |
28 } | 30 } |
29 | 31 |
(...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
179 | 181 |
180 PriorityMapPointer& pmp = sitpmi->second; | 182 PriorityMapPointer& pmp = sitpmi->second; |
181 if (pmp.alarm_enabled) | 183 if (pmp.alarm_enabled) |
182 epoll_server_->UnregisterAlarm(pmp.alarm_token); | 184 epoll_server_->UnregisterAlarm(pmp.alarm_token); |
183 else | 185 else |
184 pmp.ring->erase(pmp.it); | 186 pmp.ring->erase(pmp.it); |
185 stream_ids_.erase(sitpmi); | 187 stream_ids_.erase(sitpmi); |
186 } | 188 } |
187 | 189 |
188 } // namespace net | 190 } // namespace net |
OLD | NEW |