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

Unified Diff: net/quic/quic_sent_packet_manager.cc

Issue 605733006: Land Recent QUIC Changes. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Revert Patch Set 3 Created 6 years, 3 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « net/quic/quic_sent_packet_manager.h ('k') | net/quic/quic_sent_packet_manager_test.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/quic/quic_sent_packet_manager.cc
diff --git a/net/quic/quic_sent_packet_manager.cc b/net/quic/quic_sent_packet_manager.cc
index 12ddf29f7441943375c31b2e587cef2a59da0fa9..0d5913b1a0dceb24717096c21d116473a325797b 100644
--- a/net/quic/quic_sent_packet_manager.cc
+++ b/net/quic/quic_sent_packet_manager.cc
@@ -128,10 +128,8 @@ void QuicSentPacketManager::SetFromConfig(const QuicConfig& config) {
}
// TODO(ianswett): Remove the "HasReceivedLossDetection" branch once
// the ConnectionOptions code is live everywhere.
- if ((config.HasReceivedLossDetection() &&
- config.ReceivedLossDetection() == kTIME) ||
- (config.HasReceivedConnectionOptions() &&
- ContainsQuicTag(config.ReceivedConnectionOptions(), kTIME))) {
+ if (config.HasReceivedConnectionOptions() &&
+ ContainsQuicTag(config.ReceivedConnectionOptions(), kTIME)) {
loss_algorithm_.reset(LossDetectionInterface::Create(kTime));
}
send_algorithm_->SetFromConfig(config, is_server_);
@@ -151,6 +149,7 @@ void QuicSentPacketManager::OnSerializedPacket(
unacked_packets_.AddPacket(serialized_packet);
if (debug_delegate_ != NULL) {
+ // TODO(ianswett): Merge calls in the debug delegate.
debug_delegate_->OnSerializedPacket(serialized_packet);
}
}
@@ -505,14 +504,23 @@ QuicSentPacketManager::GetLeastUnacked() const {
}
bool QuicSentPacketManager::OnPacketSent(
- QuicPacketSequenceNumber sequence_number,
+ SerializedPacket* serialized_packet,
+ QuicPacketSequenceNumber original_sequence_number,
QuicTime sent_time,
QuicByteCount bytes,
TransmissionType transmission_type,
HasRetransmittableData has_retransmittable_data) {
+ QuicPacketSequenceNumber sequence_number = serialized_packet->sequence_number;
DCHECK_LT(0u, sequence_number);
- DCHECK(unacked_packets_.IsUnacked(sequence_number));
+ DCHECK(!unacked_packets_.IsUnacked(sequence_number));
LOG_IF(DFATAL, bytes == 0) << "Cannot send empty packets.";
+ if (original_sequence_number == 0) {
+ OnSerializedPacket(*serialized_packet);
+ serialized_packet->retransmittable_frames = NULL;
+ } else {
+ OnRetransmittedPacket(original_sequence_number, sequence_number);
+ }
+
if (pending_timer_transmission_count_ > 0) {
--pending_timer_transmission_count_;
}
« no previous file with comments | « net/quic/quic_sent_packet_manager.h ('k') | net/quic/quic_sent_packet_manager_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698