| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 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 #include "net/quic/core/congestion_control/bandwidth_sampler.h" | 5 #include "net/quic/core/congestion_control/bandwidth_sampler.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 | 8 |
| 9 #include "net/quic/core/quic_bug_tracker.h" | 9 #include "net/quic/platform/api/quic_bug_tracker.h" |
| 10 | 10 |
| 11 namespace net { | 11 namespace net { |
| 12 BandwidthSampler::BandwidthSampler() | 12 BandwidthSampler::BandwidthSampler() |
| 13 : total_bytes_sent_(0), | 13 : total_bytes_sent_(0), |
| 14 total_bytes_acked_(0), | 14 total_bytes_acked_(0), |
| 15 total_bytes_sent_at_last_acked_packet_(0), | 15 total_bytes_sent_at_last_acked_packet_(0), |
| 16 last_acked_packet_sent_time_(QuicTime::Zero()), | 16 last_acked_packet_sent_time_(QuicTime::Zero()), |
| 17 last_acked_packet_ack_time_(QuicTime::Zero()), | 17 last_acked_packet_ack_time_(QuicTime::Zero()), |
| 18 last_sent_packet_(0), | 18 last_sent_packet_(0), |
| 19 is_app_limited_(false), | 19 is_app_limited_(false), |
| (...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 146 } | 146 } |
| 147 | 147 |
| 148 void BandwidthSampler::RemoveObsoletePackets(QuicPacketNumber least_unacked) { | 148 void BandwidthSampler::RemoveObsoletePackets(QuicPacketNumber least_unacked) { |
| 149 while (!connection_state_map_.empty() && | 149 while (!connection_state_map_.empty() && |
| 150 connection_state_map_.begin()->first < least_unacked) { | 150 connection_state_map_.begin()->first < least_unacked) { |
| 151 connection_state_map_.pop_front(); | 151 connection_state_map_.pop_front(); |
| 152 } | 152 } |
| 153 } | 153 } |
| 154 | 154 |
| 155 } // namespace net | 155 } // namespace net |
| OLD | NEW |