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

Unified Diff: net/quic/core/quic_sent_packet_manager.cc

Issue 2223983002: Flatten GeneralLossAlgorithm into QuicSentPacketManager. Not flag protected. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 4 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/core/quic_sent_packet_manager.h ('k') | net/quic/core/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/core/quic_sent_packet_manager.cc
diff --git a/net/quic/core/quic_sent_packet_manager.cc b/net/quic/core/quic_sent_packet_manager.cc
index 6c61884169abd39b985b22c14d53cb0acc26e995..1c6d6c540834da04820b6a6b445152d0586d7c5b 100644
--- a/net/quic/core/quic_sent_packet_manager.cc
+++ b/net/quic/core/quic_sent_packet_manager.cc
@@ -75,7 +75,8 @@ QuicSentPacketManager::QuicSentPacketManager(
congestion_control_type,
stats,
initial_congestion_window_)),
- loss_algorithm_(new GeneralLossAlgorithm(loss_type)),
+ loss_algorithm_(&general_loss_algorithm_),
+ general_loss_algorithm_(loss_type),
n_connection_simulation_(false),
receive_buffer_bytes_(kDefaultSocketReceiveBuffer),
least_packet_awaited_by_peer_(1),
@@ -151,11 +152,11 @@ void QuicSentPacketManager::SetFromConfig(const QuicConfig& config) {
}
if (config.HasReceivedConnectionOptions() &&
ContainsQuicTag(config.ReceivedConnectionOptions(), kTIME)) {
- loss_algorithm_.reset(new GeneralLossAlgorithm(kTime));
+ general_loss_algorithm_.SetLossDetectionType(kTime);
}
if (config.HasReceivedConnectionOptions() &&
ContainsQuicTag(config.ReceivedConnectionOptions(), kATIM)) {
- loss_algorithm_.reset(new GeneralLossAlgorithm(kAdaptiveTime));
+ general_loss_algorithm_.SetLossDetectionType(kAdaptiveTime);
}
if (FLAGS_quic_loss_recovery_use_largest_acked &&
config.HasClientSentConnectionOption(kUNDO, perspective_)) {
« no previous file with comments | « net/quic/core/quic_sent_packet_manager.h ('k') | net/quic/core/quic_sent_packet_manager_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698