| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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_sent_packet_manager_peer.h" | 5 #include "net/quic/test_tools/quic_sent_packet_manager_peer.h" |
| 6 | 6 |
| 7 #include "base/stl_util.h" | 7 #include "base/stl_util.h" |
| 8 #include "net/quic/congestion_control/loss_detection_interface.h" | 8 #include "net/quic/congestion_control/loss_detection_interface.h" |
| 9 #include "net/quic/congestion_control/send_algorithm_interface.h" | 9 #include "net/quic/congestion_control/send_algorithm_interface.h" |
| 10 #include "net/quic/quic_protocol.h" | 10 #include "net/quic/quic_protocol.h" |
| 11 #include "net/quic/quic_sent_packet_manager.h" | 11 #include "net/quic/quic_sent_packet_manager.h" |
| 12 | 12 |
| 13 namespace net { | 13 namespace net { |
| 14 namespace test { | 14 namespace test { |
| 15 | 15 |
| 16 // static | 16 // static |
| 17 size_t QuicSentPacketManagerPeer::GetMaxTailLossProbes( | 17 size_t QuicSentPacketManagerPeer::GetMaxTailLossProbes( |
| 18 QuicSentPacketManager* sent_packet_manager) { | 18 QuicSentPacketManager* sent_packet_manager) { |
| 19 return sent_packet_manager->max_tail_loss_probes_; | 19 return sent_packet_manager->max_tail_loss_probes_; |
| 20 } | 20 } |
| 21 | 21 |
| 22 // static | 22 // static |
| 23 void QuicSentPacketManagerPeer::SetMaxTailLossProbes( | 23 void QuicSentPacketManagerPeer::SetMaxTailLossProbes( |
| 24 QuicSentPacketManager* sent_packet_manager, size_t max_tail_loss_probes) { | 24 QuicSentPacketManager* sent_packet_manager, size_t max_tail_loss_probes) { |
| 25 sent_packet_manager->max_tail_loss_probes_ = max_tail_loss_probes; | 25 sent_packet_manager->max_tail_loss_probes_ = max_tail_loss_probes; |
| 26 } | 26 } |
| 27 | 27 |
| 28 // static | 28 // static |
| 29 bool QuicSentPacketManagerPeer::GetUseNewRto( |
| 30 QuicSentPacketManager* sent_packet_manager) { |
| 31 return sent_packet_manager->use_new_rto_; |
| 32 } |
| 33 |
| 34 // static |
| 29 QuicByteCount QuicSentPacketManagerPeer::GetReceiveWindow( | 35 QuicByteCount QuicSentPacketManagerPeer::GetReceiveWindow( |
| 30 QuicSentPacketManager* sent_packet_manager) { | 36 QuicSentPacketManager* sent_packet_manager) { |
| 31 return sent_packet_manager->receive_buffer_bytes_; | 37 return sent_packet_manager->receive_buffer_bytes_; |
| 32 } | 38 } |
| 33 | 39 |
| 34 // static | 40 // static |
| 35 void QuicSentPacketManagerPeer::SetIsServer( | 41 void QuicSentPacketManagerPeer::SetIsServer( |
| 36 QuicSentPacketManager* sent_packet_manager, | 42 QuicSentPacketManager* sent_packet_manager, |
| 37 bool is_server) { | 43 bool is_server) { |
| 38 sent_packet_manager->is_server_ = is_server; | 44 sent_packet_manager->is_server_ = is_server; |
| (...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 160 } | 166 } |
| 161 | 167 |
| 162 // static | 168 // static |
| 163 QuicSustainedBandwidthRecorder& QuicSentPacketManagerPeer::GetBandwidthRecorder( | 169 QuicSustainedBandwidthRecorder& QuicSentPacketManagerPeer::GetBandwidthRecorder( |
| 164 QuicSentPacketManager* sent_packet_manager) { | 170 QuicSentPacketManager* sent_packet_manager) { |
| 165 return sent_packet_manager->sustained_bandwidth_recorder_; | 171 return sent_packet_manager->sustained_bandwidth_recorder_; |
| 166 } | 172 } |
| 167 | 173 |
| 168 } // namespace test | 174 } // namespace test |
| 169 } // namespace net | 175 } // namespace net |
| OLD | NEW |