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

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

Issue 109323012: Cleanup in QUIC to merge the previous_transmissions_map in (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years 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
« no previous file with comments | « net/quic/quic_sent_packet_manager.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/send_algorithm_interface.h" 8 #include "net/quic/congestion_control/send_algorithm_interface.h"
9 #include "net/quic/quic_protocol.h" 9 #include "net/quic/quic_protocol.h"
10 #include "net/quic/quic_sent_packet_manager.h" 10 #include "net/quic/quic_sent_packet_manager.h"
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 QuicSentPacketManager* sent_packet_manager) { 42 QuicSentPacketManager* sent_packet_manager) {
43 return sent_packet_manager->rtt_sample_; 43 return sent_packet_manager->rtt_sample_;
44 } 44 }
45 45
46 // static 46 // static
47 bool QuicSentPacketManagerPeer::IsRetransmission( 47 bool QuicSentPacketManagerPeer::IsRetransmission(
48 QuicSentPacketManager* sent_packet_manager, 48 QuicSentPacketManager* sent_packet_manager,
49 QuicPacketSequenceNumber sequence_number) { 49 QuicPacketSequenceNumber sequence_number) {
50 DCHECK(sent_packet_manager->HasRetransmittableFrames(sequence_number)); 50 DCHECK(sent_packet_manager->HasRetransmittableFrames(sequence_number));
51 return sent_packet_manager->HasRetransmittableFrames(sequence_number) && 51 return sent_packet_manager->HasRetransmittableFrames(sequence_number) &&
52 ContainsKey(sent_packet_manager->previous_transmissions_map_, 52 sent_packet_manager->
53 sequence_number); 53 unacked_packets_[sequence_number].previous_transmissions != NULL;
54 } 54 }
55 55
56 // static 56 // static
57 void QuicSentPacketManagerPeer::MarkForRetransmission( 57 void QuicSentPacketManagerPeer::MarkForRetransmission(
58 QuicSentPacketManager* sent_packet_manager, 58 QuicSentPacketManager* sent_packet_manager,
59 QuicPacketSequenceNumber sequence_number, 59 QuicPacketSequenceNumber sequence_number,
60 TransmissionType transmission_type) { 60 TransmissionType transmission_type) {
61 sent_packet_manager->MarkForRetransmission(sequence_number, 61 sent_packet_manager->MarkForRetransmission(sequence_number,
62 transmission_type); 62 transmission_type);
63 } 63 }
64 64
65 } // namespace test 65 } // namespace test
66 } // namespace net 66 } // namespace net
OLDNEW
« no previous file with comments | « net/quic/quic_sent_packet_manager.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698