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

Unified Diff: net/quic/quic_server_session_base.cc

Issue 2183493002: Add a merely pass-through QuicMultipathSentPacketManager. Protected behind blocked flag FLAGS_quic_… (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 5 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
Index: net/quic/quic_server_session_base.cc
diff --git a/net/quic/quic_server_session_base.cc b/net/quic/quic_server_session_base.cc
index 44bee9903c223bc844eccf053ae593ec98480adb..d3329adafea1c2397974aca6655bcd4a31bae2a3 100644
--- a/net/quic/quic_server_session_base.cc
+++ b/net/quic/quic_server_session_base.cc
@@ -127,16 +127,17 @@ void QuicServerSessionBase::OnCongestionWindowChange(QuicTime now) {
}
// If the bandwidth recorder does not have a valid estimate, return early.
- const QuicSustainedBandwidthRecorder& bandwidth_recorder =
+ const QuicSustainedBandwidthRecorder* bandwidth_recorder =
sent_packet_manager.SustainedBandwidthRecorder();
- if (!bandwidth_recorder.HasEstimate()) {
+ if (bandwidth_recorder == nullptr || !bandwidth_recorder->HasEstimate()) {
return;
}
// The bandwidth recorder has recorded at least one sustained bandwidth
// estimate. Check that it's substantially different from the last one that
// we sent to the client, and if so, send the new one.
- QuicBandwidth new_bandwidth_estimate = bandwidth_recorder.BandwidthEstimate();
+ QuicBandwidth new_bandwidth_estimate =
+ bandwidth_recorder->BandwidthEstimate();
int64_t bandwidth_delta =
std::abs(new_bandwidth_estimate.ToBitsPerSecond() -
@@ -157,8 +158,8 @@ void QuicServerSessionBase::OnCongestionWindowChange(QuicTime now) {
// Include max bandwidth in the update.
QuicBandwidth max_bandwidth_estimate =
- bandwidth_recorder.MaxBandwidthEstimate();
- int32_t max_bandwidth_timestamp = bandwidth_recorder.MaxBandwidthTimestamp();
+ bandwidth_recorder->MaxBandwidthEstimate();
+ int32_t max_bandwidth_timestamp = bandwidth_recorder->MaxBandwidthTimestamp();
// Fill the proto before passing it to the crypto stream to send.
const int32_t bw_estimate_bytes_per_second =
@@ -180,7 +181,7 @@ void QuicServerSessionBase::OnCongestionWindowChange(QuicTime now) {
cached_network_params.set_min_rtt_ms(
sent_packet_manager.GetRttStats()->min_rtt().ToMilliseconds());
cached_network_params.set_previous_connection_state(
- bandwidth_recorder.EstimateRecordedDuringSlowStart()
+ bandwidth_recorder->EstimateRecordedDuringSlowStart()
? CachedNetworkParameters::SLOW_START
: CachedNetworkParameters::CONGESTION_AVOIDANCE);
cached_network_params.set_timestamp(

Powered by Google App Engine
This is Rietveld 408576698