Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(169)

Side by Side Diff: net/quic/test_tools/quic_sent_packet_manager_peer.cc

Issue 399153003: Land Recent QUIC Changes. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Added NET_EXPORT_PRIVATE Created 6 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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"
(...skipping 15 matching lines...) Expand all
26 sent_packet_manager->send_algorithm_.reset(send_algorithm); 26 sent_packet_manager->send_algorithm_.reset(send_algorithm);
27 } 27 }
28 28
29 // static 29 // static
30 const LossDetectionInterface* QuicSentPacketManagerPeer::GetLossAlgorithm( 30 const LossDetectionInterface* QuicSentPacketManagerPeer::GetLossAlgorithm(
31 QuicSentPacketManager* sent_packet_manager) { 31 QuicSentPacketManager* sent_packet_manager) {
32 return sent_packet_manager->loss_algorithm_.get(); 32 return sent_packet_manager->loss_algorithm_.get();
33 } 33 }
34 34
35 // static 35 // static
36 const SendAlgorithmInterface*
37 QuicSentPacketManagerPeer::GetCongestionControlAlgorithm(
38 QuicSentPacketManager* sent_packet_manager) {
39 return sent_packet_manager->send_algorithm_.get();
40 }
41
42 // static
36 void QuicSentPacketManagerPeer::SetLossAlgorithm( 43 void QuicSentPacketManagerPeer::SetLossAlgorithm(
37 QuicSentPacketManager* sent_packet_manager, 44 QuicSentPacketManager* sent_packet_manager,
38 LossDetectionInterface* loss_detector) { 45 LossDetectionInterface* loss_detector) {
39 sent_packet_manager->loss_algorithm_.reset(loss_detector); 46 sent_packet_manager->loss_algorithm_.reset(loss_detector);
40 } 47 }
41 48
42 // static 49 // static
43 RttStats* QuicSentPacketManagerPeer::GetRttStats( 50 RttStats* QuicSentPacketManagerPeer::GetRttStats(
44 QuicSentPacketManager* sent_packet_manager) { 51 QuicSentPacketManager* sent_packet_manager) {
45 return &sent_packet_manager->rtt_stats_; 52 return &sent_packet_manager->rtt_stats_;
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
119 } 126 }
120 return num_unacked_packets; 127 return num_unacked_packets;
121 } 128 }
122 129
123 // static 130 // static
124 QuicByteCount QuicSentPacketManagerPeer::GetBytesInFlight( 131 QuicByteCount QuicSentPacketManagerPeer::GetBytesInFlight(
125 const QuicSentPacketManager* sent_packet_manager) { 132 const QuicSentPacketManager* sent_packet_manager) {
126 return sent_packet_manager->unacked_packets_.bytes_in_flight(); 133 return sent_packet_manager->unacked_packets_.bytes_in_flight();
127 } 134 }
128 135
136 // static
137 QuicSentPacketManager::NetworkChangeVisitor*
138 QuicSentPacketManagerPeer::GetNetworkChangeVisitor(
139 const QuicSentPacketManager* sent_packet_manager) {
140 return sent_packet_manager->network_change_visitor_;
141 }
142
129 } // namespace test 143 } // namespace test
130 } // namespace net 144 } // namespace net
OLDNEW
« no previous file with comments | « net/quic/test_tools/quic_sent_packet_manager_peer.h ('k') | net/quic/test_tools/quic_test_utils.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698