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

Unified Diff: net/quic/quic_sent_packet_manager.cc

Issue 1037643002: Land Recent QUIC Changes until 03/22/2015. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: deleted duplicated using statements in net/tools/quic/test_tools/quic_test_utils.cc 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 1694da25415a1b5b1b198009716d601cb793f012..829b9cbe99727f154a4896446b5b1f8bb0339a9d 100644
--- a/net/quic/quic_sent_packet_manager.cc
+++ b/net/quic/quic_sent_packet_manager.cc
@@ -172,6 +172,10 @@ void QuicSentPacketManager::SetFromConfig(const QuicConfig& config) {
receive_buffer_bytes_ =
max(kMinSocketReceiveBuffer,
static_cast<QuicByteCount>(config.ReceivedSocketReceiveBuffer()));
+ if (FLAGS_quic_limit_max_cwnd_to_receive_buffer) {
+ send_algorithm_->SetMaxCongestionWindow(receive_buffer_bytes_ *
+ kUsableRecieveBufferFraction);
+ }
}
send_algorithm_->SetFromConfig(config, perspective_, using_pacing_);
@@ -181,7 +185,8 @@ void QuicSentPacketManager::SetFromConfig(const QuicConfig& config) {
}
bool QuicSentPacketManager::ResumeConnectionState(
- const CachedNetworkParameters& cached_network_params) {
+ const CachedNetworkParameters& cached_network_params,
+ bool max_bandwidth_resumption) {
if (cached_network_params.has_min_rtt_ms()) {
uint32 initial_rtt_us =
kNumMicrosPerMilli * cached_network_params.min_rtt_ms();
@@ -189,7 +194,8 @@ bool QuicSentPacketManager::ResumeConnectionState(
max(kMinInitialRoundTripTimeUs,
min(kMaxInitialRoundTripTimeUs, initial_rtt_us)));
}
- return send_algorithm_->ResumeConnectionState(cached_network_params);
+ return send_algorithm_->ResumeConnectionState(cached_network_params,
+ max_bandwidth_resumption);
}
void QuicSentPacketManager::SetNumOpenStreams(size_t num_streams) {
@@ -791,8 +797,9 @@ QuicTime::Delta QuicSentPacketManager::TimeUntilSend(
if (pending_timer_transmission_count_ > 0) {
return QuicTime::Delta::Zero();
}
- if (unacked_packets_.bytes_in_flight() >=
- kUsableRecieveBufferFraction * receive_buffer_bytes_) {
+ if (!FLAGS_quic_limit_max_cwnd_to_receive_buffer &&
+ unacked_packets_.bytes_in_flight() >=
+ kUsableRecieveBufferFraction * receive_buffer_bytes_) {
return QuicTime::Delta::Infinite();
}
return send_algorithm_->TimeUntilSend(
« 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