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

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

Issue 968233004: Land Recent QUIC Changes until 03/02/2015. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@cleanup
Patch Set: Created 5 years, 9 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
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 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
71 sent_packet_manager->loss_algorithm_.reset(loss_detector); 71 sent_packet_manager->loss_algorithm_.reset(loss_detector);
72 } 72 }
73 73
74 // static 74 // static
75 RttStats* QuicSentPacketManagerPeer::GetRttStats( 75 RttStats* QuicSentPacketManagerPeer::GetRttStats(
76 QuicSentPacketManager* sent_packet_manager) { 76 QuicSentPacketManager* sent_packet_manager) {
77 return &sent_packet_manager->rtt_stats_; 77 return &sent_packet_manager->rtt_stats_;
78 } 78 }
79 79
80 // static 80 // static
81 QuicPacketCount QuicSentPacketManagerPeer::GetNackCount(
82 const QuicSentPacketManager* sent_packet_manager,
83 QuicPacketSequenceNumber sequence_number) {
84 return sent_packet_manager->unacked_packets_.
85 GetTransmissionInfo(sequence_number).nack_count;
86 }
87
88 // static
89 size_t QuicSentPacketManagerPeer::GetPendingRetransmissionCount(
90 const QuicSentPacketManager* sent_packet_manager) {
91 return sent_packet_manager->pending_retransmissions_.size();
92 }
93
94 // static
95 bool QuicSentPacketManagerPeer::HasPendingPackets( 81 bool QuicSentPacketManagerPeer::HasPendingPackets(
96 const QuicSentPacketManager* sent_packet_manager) { 82 const QuicSentPacketManager* sent_packet_manager) {
97 return sent_packet_manager->unacked_packets_.HasInFlightPackets(); 83 return sent_packet_manager->unacked_packets_.HasInFlightPackets();
98 } 84 }
99 85
100 // static 86 // static
101 QuicTime QuicSentPacketManagerPeer::GetSentTime( 87 QuicTime QuicSentPacketManagerPeer::GetSentTime(
102 const QuicSentPacketManager* sent_packet_manager, 88 const QuicSentPacketManager* sent_packet_manager,
103 QuicPacketSequenceNumber sequence_number) { 89 QuicPacketSequenceNumber sequence_number) {
104 DCHECK(sent_packet_manager->unacked_packets_.IsUnacked(sequence_number)); 90 DCHECK(sent_packet_manager->unacked_packets_.IsUnacked(sequence_number));
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
166 } 152 }
167 153
168 // static 154 // static
169 QuicSustainedBandwidthRecorder& QuicSentPacketManagerPeer::GetBandwidthRecorder( 155 QuicSustainedBandwidthRecorder& QuicSentPacketManagerPeer::GetBandwidthRecorder(
170 QuicSentPacketManager* sent_packet_manager) { 156 QuicSentPacketManager* sent_packet_manager) {
171 return sent_packet_manager->sustained_bandwidth_recorder_; 157 return sent_packet_manager->sustained_bandwidth_recorder_;
172 } 158 }
173 159
174 } // namespace test 160 } // namespace test
175 } // namespace net 161 } // 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