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

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

Issue 612323013: QUIC - (no behavior change) s/NULL/nullptr/g in .../quic/... (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 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 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
89 sequence_number).sent_time; 89 sequence_number).sent_time;
90 } 90 }
91 91
92 // static 92 // static
93 bool QuicSentPacketManagerPeer::IsRetransmission( 93 bool QuicSentPacketManagerPeer::IsRetransmission(
94 QuicSentPacketManager* sent_packet_manager, 94 QuicSentPacketManager* sent_packet_manager,
95 QuicPacketSequenceNumber sequence_number) { 95 QuicPacketSequenceNumber sequence_number) {
96 DCHECK(sent_packet_manager->HasRetransmittableFrames(sequence_number)); 96 DCHECK(sent_packet_manager->HasRetransmittableFrames(sequence_number));
97 return sent_packet_manager->HasRetransmittableFrames(sequence_number) && 97 return sent_packet_manager->HasRetransmittableFrames(sequence_number) &&
98 sent_packet_manager->unacked_packets_.GetTransmissionInfo( 98 sent_packet_manager->unacked_packets_.GetTransmissionInfo(
99 sequence_number).all_transmissions != NULL; 99 sequence_number).all_transmissions != nullptr;
100 } 100 }
101 101
102 // static 102 // static
103 void QuicSentPacketManagerPeer::MarkForRetransmission( 103 void QuicSentPacketManagerPeer::MarkForRetransmission(
104 QuicSentPacketManager* sent_packet_manager, 104 QuicSentPacketManager* sent_packet_manager,
105 QuicPacketSequenceNumber sequence_number, 105 QuicPacketSequenceNumber sequence_number,
106 TransmissionType transmission_type) { 106 TransmissionType transmission_type) {
107 sent_packet_manager->MarkForRetransmission(sequence_number, 107 sent_packet_manager->MarkForRetransmission(sequence_number,
108 transmission_type); 108 transmission_type);
109 } 109 }
(...skipping 10 matching lines...) Expand all
120 return sent_packet_manager->unacked_packets_.HasPendingCryptoPackets(); 120 return sent_packet_manager->unacked_packets_.HasPendingCryptoPackets();
121 } 121 }
122 122
123 // static 123 // static
124 size_t QuicSentPacketManagerPeer::GetNumRetransmittablePackets( 124 size_t QuicSentPacketManagerPeer::GetNumRetransmittablePackets(
125 const QuicSentPacketManager* sent_packet_manager) { 125 const QuicSentPacketManager* sent_packet_manager) {
126 size_t num_unacked_packets = 0; 126 size_t num_unacked_packets = 0;
127 for (QuicUnackedPacketMap::const_iterator it = 127 for (QuicUnackedPacketMap::const_iterator it =
128 sent_packet_manager->unacked_packets_.begin(); 128 sent_packet_manager->unacked_packets_.begin();
129 it != sent_packet_manager->unacked_packets_.end(); ++it) { 129 it != sent_packet_manager->unacked_packets_.end(); ++it) {
130 if (it->retransmittable_frames != NULL) { 130 if (it->retransmittable_frames != nullptr) {
131 ++num_unacked_packets; 131 ++num_unacked_packets;
132 } 132 }
133 } 133 }
134 return num_unacked_packets; 134 return num_unacked_packets;
135 } 135 }
136 136
137 // static 137 // static
138 QuicByteCount QuicSentPacketManagerPeer::GetBytesInFlight( 138 QuicByteCount QuicSentPacketManagerPeer::GetBytesInFlight(
139 const QuicSentPacketManager* sent_packet_manager) { 139 const QuicSentPacketManager* sent_packet_manager) {
140 return sent_packet_manager->unacked_packets_.bytes_in_flight(); 140 return sent_packet_manager->unacked_packets_.bytes_in_flight();
141 } 141 }
142 142
143 // static 143 // static
144 QuicSentPacketManager::NetworkChangeVisitor* 144 QuicSentPacketManager::NetworkChangeVisitor*
145 QuicSentPacketManagerPeer::GetNetworkChangeVisitor( 145 QuicSentPacketManagerPeer::GetNetworkChangeVisitor(
146 const QuicSentPacketManager* sent_packet_manager) { 146 const QuicSentPacketManager* sent_packet_manager) {
147 return sent_packet_manager->network_change_visitor_; 147 return sent_packet_manager->network_change_visitor_;
148 } 148 }
149 149
150 // static 150 // static
151 QuicSustainedBandwidthRecorder& QuicSentPacketManagerPeer::GetBandwidthRecorder( 151 QuicSustainedBandwidthRecorder& QuicSentPacketManagerPeer::GetBandwidthRecorder(
152 QuicSentPacketManager* sent_packet_manager) { 152 QuicSentPacketManager* sent_packet_manager) {
153 return sent_packet_manager->sustained_bandwidth_recorder_; 153 return sent_packet_manager->sustained_bandwidth_recorder_;
154 } 154 }
155 155
156 } // namespace test 156 } // namespace test
157 } // namespace net 157 } // namespace net
OLDNEW
« no previous file with comments | « net/quic/test_tools/mock_crypto_client_stream_factory.cc ('k') | net/quic/test_tools/quic_test_utils.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698