| 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 namespace net { | 12 namespace net { |
| 13 | 13 |
| 14 OutputOrdering::PriorityMapPointer::PriorityMapPointer() | 14 OutputOrdering::PriorityMapPointer::PriorityMapPointer() |
| 15 : ring(NULL), alarm_enabled(false) {} | 15 : ring(NULL), alarm_enabled(false) {} |
| 16 | 16 |
| 17 OutputOrdering::PriorityMapPointer::~PriorityMapPointer() {} |
| 18 |
| 17 // static | 19 // static |
| 18 double OutputOrdering::server_think_time_in_s_ = 0.0; | 20 double OutputOrdering::server_think_time_in_s_ = 0.0; |
| 19 | 21 |
| 20 OutputOrdering::OutputOrdering(SMConnectionInterface* connection) | 22 OutputOrdering::OutputOrdering(SMConnectionInterface* connection) |
| 21 : first_data_senders_threshold_(kInitialDataSendersThreshold), | 23 : first_data_senders_threshold_(kInitialDataSendersThreshold), |
| 22 connection_(connection) { | 24 connection_(connection) { |
| 23 if (connection) | 25 if (connection) |
| 24 epoll_server_ = connection->epoll_server(); | 26 epoll_server_ = connection->epoll_server(); |
| 25 } | 27 } |
| 26 | 28 |
| (...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 164 | 166 |
| 165 PriorityMapPointer& pmp = sitpmi->second; | 167 PriorityMapPointer& pmp = sitpmi->second; |
| 166 if (pmp.alarm_enabled) | 168 if (pmp.alarm_enabled) |
| 167 epoll_server_->UnregisterAlarm(pmp.alarm_token); | 169 epoll_server_->UnregisterAlarm(pmp.alarm_token); |
| 168 else | 170 else |
| 169 pmp.ring->erase(pmp.it); | 171 pmp.ring->erase(pmp.it); |
| 170 stream_ids_.erase(sitpmi); | 172 stream_ids_.erase(sitpmi); |
| 171 } | 173 } |
| 172 | 174 |
| 173 } // namespace net | 175 } // namespace net |
| OLD | NEW |