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

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

Issue 1013583002: Make the SentPacketManager remove pending retransmissions for reset (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@Replace_CID_with_connection_id_88463135
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
« 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 »
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 923 matching lines...) Expand 10 before | Expand all | Expand 10 after
934 934
935 QuicPacketCount QuicSentPacketManager::GetSlowStartThresholdInTcpMss() const { 935 QuicPacketCount QuicSentPacketManager::GetSlowStartThresholdInTcpMss() const {
936 return send_algorithm_->GetSlowStartThreshold() / kDefaultTCPMSS; 936 return send_algorithm_->GetSlowStartThreshold() / kDefaultTCPMSS;
937 } 937 }
938 938
939 void QuicSentPacketManager::OnSerializedPacket( 939 void QuicSentPacketManager::OnSerializedPacket(
940 const SerializedPacket& serialized_packet) { 940 const SerializedPacket& serialized_packet) {
941 ack_notifier_manager_.OnSerializedPacket(serialized_packet); 941 ack_notifier_manager_.OnSerializedPacket(serialized_packet);
942 } 942 }
943 943
944 void QuicSentPacketManager::CancelRetransmissionsForStream(
945 QuicStreamId stream_id) {
946 unacked_packets_.CancelRetransmissionsForStream(stream_id);
947 PendingRetransmissionMap::iterator it = pending_retransmissions_.begin();
948 while (it != pending_retransmissions_.end()) {
949 if (HasRetransmittableFrames(it->first)) {
950 ++it;
951 continue;
952 }
953 it = pending_retransmissions_.erase(it);
954 }
955 }
956
944 void QuicSentPacketManager::EnablePacing() { 957 void QuicSentPacketManager::EnablePacing() {
945 // TODO(ianswett): Replace with a method which wraps the send algorithm in a 958 // TODO(ianswett): Replace with a method which wraps the send algorithm in a
946 // pacer every time a new algorithm is set. 959 // pacer every time a new algorithm is set.
947 if (using_pacing_) { 960 if (using_pacing_) {
948 return; 961 return;
949 } 962 }
950 963
951 // Set up a pacing sender with a 1 millisecond alarm granularity, the same as 964 // Set up a pacing sender with a 1 millisecond alarm granularity, the same as
952 // the default granularity of the Linux kernel's FQ qdisc. 965 // the default granularity of the Linux kernel's FQ qdisc.
953 using_pacing_ = true; 966 using_pacing_ = true;
954 send_algorithm_.reset( 967 send_algorithm_.reset(
955 new PacingSender(send_algorithm_.release(), 968 new PacingSender(send_algorithm_.release(),
956 QuicTime::Delta::FromMilliseconds(1), 969 QuicTime::Delta::FromMilliseconds(1),
957 kInitialUnpacedBurst)); 970 kInitialUnpacedBurst));
958 } 971 }
959 972
960 } // namespace net 973 } // namespace net
OLDNEW
« 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