OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/test_tools/quic_sustained_bandwidth_recorder_peer.h" | 5 #include "net/quic/test_tools/quic_sustained_bandwidth_recorder_peer.h" |
6 | 6 |
7 #include "net/quic/quic_protocol.h" | 7 #include "net/quic/quic_protocol.h" |
8 #include "net/quic/quic_sustained_bandwidth_recorder.h" | 8 #include "net/quic/quic_sustained_bandwidth_recorder.h" |
9 | 9 |
10 namespace net { | 10 namespace net { |
11 namespace test { | 11 namespace test { |
12 | 12 |
13 // static | 13 // static |
14 void QuicSustainedBandwidthRecorderPeer::SetBandwidthEstimate( | 14 void QuicSustainedBandwidthRecorderPeer::SetBandwidthEstimate( |
15 QuicSustainedBandwidthRecorder* bandwidth_recorder, | 15 QuicSustainedBandwidthRecorder* bandwidth_recorder, |
16 int32 bandwidth_estimate_kbytes_per_second) { | 16 int32_t bandwidth_estimate_kbytes_per_second) { |
17 bandwidth_recorder->has_estimate_ = true; | 17 bandwidth_recorder->has_estimate_ = true; |
18 bandwidth_recorder->bandwidth_estimate_ = | 18 bandwidth_recorder->bandwidth_estimate_ = |
19 QuicBandwidth::FromKBytesPerSecond(bandwidth_estimate_kbytes_per_second); | 19 QuicBandwidth::FromKBytesPerSecond(bandwidth_estimate_kbytes_per_second); |
20 } | 20 } |
21 | 21 |
22 // static | 22 // static |
23 void QuicSustainedBandwidthRecorderPeer::SetMaxBandwidthEstimate( | 23 void QuicSustainedBandwidthRecorderPeer::SetMaxBandwidthEstimate( |
24 QuicSustainedBandwidthRecorder* bandwidth_recorder, | 24 QuicSustainedBandwidthRecorder* bandwidth_recorder, |
25 int32 max_bandwidth_estimate_kbytes_per_second, | 25 int32_t max_bandwidth_estimate_kbytes_per_second, |
26 int32 max_bandwidth_timestamp) { | 26 int32_t max_bandwidth_timestamp) { |
27 bandwidth_recorder->max_bandwidth_estimate_ = | 27 bandwidth_recorder->max_bandwidth_estimate_ = |
28 QuicBandwidth::FromKBytesPerSecond( | 28 QuicBandwidth::FromKBytesPerSecond( |
29 max_bandwidth_estimate_kbytes_per_second); | 29 max_bandwidth_estimate_kbytes_per_second); |
30 bandwidth_recorder->max_bandwidth_timestamp_ = max_bandwidth_timestamp; | 30 bandwidth_recorder->max_bandwidth_timestamp_ = max_bandwidth_timestamp; |
31 } | 31 } |
32 | 32 |
33 } // namespace test | 33 } // namespace test |
34 } // namespace net | 34 } // namespace net |
OLD | NEW |