summaryrefslogtreecommitdiffstats
path: root/net/spdy/spdy_session.h
diff options
context:
space:
mode:
authorrtenneti@google.com <rtenneti@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2011-12-10 04:52:10 +0000
committerrtenneti@google.com <rtenneti@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2011-12-10 04:52:10 +0000
commit42baef7a5c2658d767cc15db5834e1f4b7bd4746 (patch)
treeacc5161c111cbf1db516538acfc660dd1caa32e2 /net/spdy/spdy_session.h
parent83260e00ec89e0a98492a1d3f5aad64684c3316d (diff)
downloadchromium_src-42baef7a5c2658d767cc15db5834e1f4b7bd4746.zip
chromium_src-42baef7a5c2658d767cc15db5834e1f4b7bd4746.tar.gz
chromium_src-42baef7a5c2658d767cc15db5834e1f4b7bd4746.tar.bz2
SPDY - add support for spdy/2.1 to support flow control.
1) Add spdy/2.1 as a supported NPN protocol. 2) Advertise that chrome supports spdy/2.1 when --flow-control (spdy flag) is enabled. 3) When SPDY protocol is negotiated, enable flow_control in spdy_session if spdy/2.1 is negotiated as NPN protocol. BUG=106911 R=willchan TEST=network unit tests and if possible test with SPDY 2.1 server with command line flag --flow-control. This CL is same as the following CL. Implemented changes suggested by willchan in the following review. http://codereview.chromium.org/8890044/ Review URL: http://codereview.chromium.org/8892026 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@113942 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/spdy/spdy_session.h')
-rw-r--r--net/spdy/spdy_session.h14
1 files changed, 11 insertions, 3 deletions
diff --git a/net/spdy/spdy_session.h b/net/spdy/spdy_session.h
index a05bd3c..3da2f1e 100644
--- a/net/spdy/spdy_session.h
+++ b/net/spdy/spdy_session.h
@@ -149,9 +149,9 @@ class NET_EXPORT SpdySession : public base::RefCounted<SpdySession>,
static void SetSSLMode(bool enable) { use_ssl_ = enable; }
static bool SSLMode() { return use_ssl_; }
- // Enable or disable flow control.
- static void set_flow_control(bool enable) { use_flow_control_ = enable; }
- static bool flow_control() { return use_flow_control_; }
+ // Enable or disable flow control used by unit tests. This only applies for
+ // new SpdySessions.
+ static void set_use_flow_control(bool enable) { use_flow_control_ = enable; }
// Sets the max concurrent streams per session, as a ceiling on any server
// specific SETTINGS value.
@@ -224,6 +224,11 @@ class NET_EXPORT SpdySession : public base::RefCounted<SpdySession>,
return unclaimed_pushed_streams_.size();
}
+ // Returns true if flow control is enabled for the session.
+ bool is_flow_control_enabled() const {
+ return flow_control_;
+ }
+
const BoundNetLog& net_log() const { return net_log_; }
int GetPeerAddress(AddressList* address) const;
@@ -540,6 +545,9 @@ class NET_EXPORT SpdySession : public base::RefCounted<SpdySession>,
// waste of effort (and MUST not be done).
bool need_to_send_ping_;
+ // Indicate if flow control is enabled or not.
+ bool flow_control_;
+
// Initial send window size for the session; can be changed by an
// arriving SETTINGS frame; newly created streams use this value for the
// initial send window size.