diff options
author | agayev@chromium.org <agayev@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-07-22 02:29:16 +0000 |
---|---|---|
committer | agayev@chromium.org <agayev@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-07-22 02:29:16 +0000 |
commit | 7349c6b146c267b7f634d518296f631642ef7095 (patch) | |
tree | d74e8aeeef9e20e83a44c798ac68bb8b7f3e2a2b /net/http | |
parent | ebf40a790f097712268847862f8a94ce2f69c772 (diff) | |
download | chromium_src-7349c6b146c267b7f634d518296f631642ef7095.zip chromium_src-7349c6b146c267b7f634d518296f631642ef7095.tar.gz chromium_src-7349c6b146c267b7f634d518296f631642ef7095.tar.bz2 |
SPDY flow control: enforce obeying send window size via a command-line switch, initial support for receive window size.
BUG=48100
TEST=net_unittestss --gtest_filter="SpdyProtocolTest.ControlFrameStructs:SpdyNetworkTransactionTest.WindowUpdate:SpdyNetworkTransactionTest.WindowUpdateOverflow"
Review URL: http://codereview.chromium.org/3052005
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@53297 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/http')
-rw-r--r-- | net/http/http_network_layer.cc | 8 | ||||
-rw-r--r-- | net/http/http_network_layer.h | 4 |
2 files changed, 11 insertions, 1 deletions
diff --git a/net/http/http_network_layer.cc b/net/http/http_network_layer.cc index 7df286f..4950a7b 100644 --- a/net/http/http_network_layer.cc +++ b/net/http/http_network_layer.cc @@ -130,6 +130,12 @@ void HttpNetworkLayer::EnableSpdy(const std::string& mode) { static const char kDisableCompression[] = "no-compress"; static const char kDisableAltProtocols[] = "no-alt-protocols"; + // If flow-control is enabled, received WINDOW_UPDATE and SETTINGS + // messages are processed and outstanding window size is actually obeyed + // when sending data frames, and WINDOW_UPDATE messages are generated + // when data is consumed. + static const char kEnableFlowControl[] = "flow-control"; + // We want an A/B experiment between SPDY enabled and SPDY disabled, // but only for pages where SPDY *could have been* negotiated. To do // this, we use NPN, but prevent it from negotiating SPDY. If the @@ -179,6 +185,8 @@ void HttpNetworkLayer::EnableSpdy(const std::string& mode) { } else if (option == kDisableAltProtocols) { use_alt_protocols = false; HttpNetworkTransaction::SetUseAlternateProtocols(false); + } else if (option == kEnableFlowControl) { + SpdySession::SetFlowControl(true); } else if (option.empty() && it == spdy_options.begin()) { continue; } else { diff --git a/net/http/http_network_layer.h b/net/http/http_network_layer.h index 8cc62ab..657fcd3 100644 --- a/net/http/http_network_layer.h +++ b/net/http/http_network_layer.h @@ -66,9 +66,11 @@ class HttpNetworkLayer : public HttpTransactionFactory, public NonThreadSafe { // Enable the spdy protocol. // Without calling this function, SPDY is disabled. The mode can be: - // "" : (default) SSL and compression are enabled. + // "" : (default) SSL and compression are enabled, flow + // control disabled. // "no-ssl" : disables SSL. // "no-compress" : disables compression. + // "flow-control": enables flow control. // "none" : disables both SSL and compression. static void EnableSpdy(const std::string& mode); |