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

Unified Diff: net/quic/quic_sent_packet_manager.cc

Issue 1008323002: Land Recent QUIC Changes until 03/15/2015. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@Final_0315
Patch Set: Add quic_packet_reader to BUILD.gn to fix compiler errors 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 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 8a198dbb5cf7fddf3dfbd4a7f3b41f8b00a81d5a..1694da25415a1b5b1b198009716d601cb793f012 100644
--- a/net/quic/quic_sent_packet_manager.cc
+++ b/net/quic/quic_sent_packet_manager.cc
@@ -138,8 +138,17 @@ void QuicSentPacketManager::SetFromConfig(const QuicConfig& config) {
}
if (config.HasReceivedConnectionOptions() &&
ContainsQuicTag(config.ReceivedConnectionOptions(), kRENO)) {
+ if (ContainsQuicTag(config.ReceivedConnectionOptions(), kBYTE)) {
+ send_algorithm_.reset(SendAlgorithmInterface::Create(
+ clock_, &rtt_stats_, kRenoBytes, stats_, initial_congestion_window_));
+ } else {
+ send_algorithm_.reset(SendAlgorithmInterface::Create(
+ clock_, &rtt_stats_, kReno, stats_, initial_congestion_window_));
+ }
+ } else if (config.HasReceivedConnectionOptions() &&
+ ContainsQuicTag(config.ReceivedConnectionOptions(), kBYTE)) {
send_algorithm_.reset(SendAlgorithmInterface::Create(
- clock_, &rtt_stats_, kReno, stats_, initial_congestion_window_));
+ clock_, &rtt_stats_, kCubicBytes, stats_, initial_congestion_window_));
}
EnablePacing();
@@ -932,6 +941,19 @@ void QuicSentPacketManager::OnSerializedPacket(
ack_notifier_manager_.OnSerializedPacket(serialized_packet);
}
+void QuicSentPacketManager::CancelRetransmissionsForStream(
+ QuicStreamId stream_id) {
+ unacked_packets_.CancelRetransmissionsForStream(stream_id);
+ PendingRetransmissionMap::iterator it = pending_retransmissions_.begin();
+ while (it != pending_retransmissions_.end()) {
+ if (HasRetransmittableFrames(it->first)) {
+ ++it;
+ continue;
+ }
+ it = pending_retransmissions_.erase(it);
+ }
+}
+
void QuicSentPacketManager::EnablePacing() {
// TODO(ianswett): Replace with a method which wraps the send algorithm in a
// pacer every time a new algorithm is set.
« 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