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

Unified Diff: net/quic/quic_config.cc

Issue 333803007: Rather than passing initial_flow_control_window all the way down the (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 6 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_config.h ('k') | net/quic/quic_config_test.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/quic/quic_config.cc
diff --git a/net/quic/quic_config.cc b/net/quic/quic_config.cc
index 215c362f53a0d2001bec022a9e169e2b05e69e0d..f7b8250125cac36c1487ed121e2927caee56ecf7 100644
--- a/net/quic/quic_config.cc
+++ b/net/quic/quic_config.cc
@@ -537,11 +537,21 @@ uint32 QuicConfig::ReceivedInitialRoundTripTimeUs() const {
}
void QuicConfig::SetInitialFlowControlWindowToSend(uint32 window_bytes) {
+ if (window_bytes < kDefaultFlowControlSendWindow) {
+ LOG(DFATAL) << "Initial flow control receive window (" << window_bytes
+ << ") cannot be set lower than default ("
+ << kDefaultFlowControlSendWindow << ").";
+ window_bytes = kDefaultFlowControlSendWindow;
+ }
initial_flow_control_window_bytes_.SetSendValue(window_bytes);
}
+uint32 QuicConfig::GetInitialFlowControlWindowToSend() const {
+ return initial_flow_control_window_bytes_.GetSendValue();
+}
+
bool QuicConfig::HasReceivedInitialFlowControlWindowBytes() const {
- return initial_flow_control_window_bytes_.HasReceivedValue();;
+ return initial_flow_control_window_bytes_.HasReceivedValue();
}
uint32 QuicConfig::ReceivedInitialFlowControlWindowBytes() const {
@@ -573,6 +583,8 @@ void QuicConfig::SetDefaults() {
kDefaultMaxStreamsPerConnection);
max_time_before_crypto_handshake_ = QuicTime::Delta::FromSeconds(
kDefaultMaxTimeForCryptoHandshakeSecs);
+
+ SetInitialFlowControlWindowToSend(kDefaultFlowControlSendWindow);
}
void QuicConfig::EnablePacing(bool enable_pacing) {
« no previous file with comments | « net/quic/quic_config.h ('k') | net/quic/quic_config_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698