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

Side by Side Diff: net/quic/quic_sent_packet_manager.cc

Issue 648933003: Land Recent QUIC Changes. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Merge with TOT 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
« no previous file with comments | « net/quic/quic_sent_packet_manager.h ('k') | net/quic/quic_server_bin.cc » ('j') | 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/quic_sent_packet_manager.h" 5 #include "net/quic/quic_sent_packet_manager.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/stl_util.h" 10 #include "base/stl_util.h"
(...skipping 485 matching lines...) Expand 10 before | Expand all | Expand 10 after
496 SerializedPacket* serialized_packet, 496 SerializedPacket* serialized_packet,
497 QuicPacketSequenceNumber original_sequence_number, 497 QuicPacketSequenceNumber original_sequence_number,
498 QuicTime sent_time, 498 QuicTime sent_time,
499 QuicByteCount bytes, 499 QuicByteCount bytes,
500 TransmissionType transmission_type, 500 TransmissionType transmission_type,
501 HasRetransmittableData has_retransmittable_data) { 501 HasRetransmittableData has_retransmittable_data) {
502 QuicPacketSequenceNumber sequence_number = serialized_packet->sequence_number; 502 QuicPacketSequenceNumber sequence_number = serialized_packet->sequence_number;
503 DCHECK_LT(0u, sequence_number); 503 DCHECK_LT(0u, sequence_number);
504 DCHECK(!unacked_packets_.IsUnacked(sequence_number)); 504 DCHECK(!unacked_packets_.IsUnacked(sequence_number));
505 LOG_IF(DFATAL, bytes == 0) << "Cannot send empty packets."; 505 LOG_IF(DFATAL, bytes == 0) << "Cannot send empty packets.";
506 if (debug_delegate_ != nullptr) {
507 debug_delegate_->OnSentPacket(*serialized_packet,
508 original_sequence_number,
509 sent_time,
510 bytes,
511 transmission_type);
512 }
513 506
514 if (original_sequence_number == 0) { 507 if (original_sequence_number == 0) {
515 if (serialized_packet->retransmittable_frames) { 508 if (serialized_packet->retransmittable_frames) {
516 ack_notifier_manager_.OnSerializedPacket(*serialized_packet); 509 ack_notifier_manager_.OnSerializedPacket(*serialized_packet);
517 } 510 }
518 unacked_packets_.AddPacket(*serialized_packet); 511 unacked_packets_.AddPacket(*serialized_packet);
519 serialized_packet->retransmittable_frames = nullptr; 512 serialized_packet->retransmittable_frames = nullptr;
520 } else { 513 } else {
521 OnRetransmittedPacket(original_sequence_number, sequence_number); 514 OnRetransmittedPacket(original_sequence_number, sequence_number);
522 } 515 }
(...skipping 357 matching lines...) Expand 10 before | Expand all | Expand 10 after
880 873
881 // Set up a pacing sender with a 5 millisecond alarm granularity. 874 // Set up a pacing sender with a 5 millisecond alarm granularity.
882 using_pacing_ = true; 875 using_pacing_ = true;
883 send_algorithm_.reset( 876 send_algorithm_.reset(
884 new PacingSender(send_algorithm_.release(), 877 new PacingSender(send_algorithm_.release(),
885 QuicTime::Delta::FromMilliseconds(5), 878 QuicTime::Delta::FromMilliseconds(5),
886 kInitialUnpacedBurst)); 879 kInitialUnpacedBurst));
887 } 880 }
888 881
889 } // namespace net 882 } // namespace net
OLDNEW
« no previous file with comments | « net/quic/quic_sent_packet_manager.h ('k') | net/quic/quic_server_bin.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698