Index: net/spdy/spdy_session.h |
=================================================================== |
--- net/spdy/spdy_session.h (revision 119306) |
+++ net/spdy/spdy_session.h (working copy) |
@@ -48,6 +48,16 @@ |
class NET_EXPORT SpdySession : public base::RefCounted<SpdySession>, |
public spdy::BufferedSpdyFramerVisitorInterface { |
public: |
+ // FlowControl provides the ability for unit tests to either enable or disable |
+ // flow control (independent of NPN protocol negotiated). If |
+ // |use_flow_control_| is set to kFlowControlBasedOnNPN then flow control is |
+ // determined by the NPN protocol negotiated with the server. |
+ enum FlowControl { |
+ kFlowControlBasedOnNPN = 0, |
+ kDisableFlowControl = 1, |
+ kEnableFlowControl = 2, |
+ }; |
+ |
// Create a new SpdySession. |
// |host_port_proxy_pair| is the host/port that this session connects to, and |
// the proxy configuration settings that it's using. |
@@ -153,7 +163,9 @@ |
// 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; } |
+ static void set_use_flow_control(FlowControl flow_control) { |
+ use_flow_control_ = flow_control; |
+ } |
// Sets the max concurrent streams per session, as a ceiling on any server |
// specific SETTINGS value. |
@@ -579,7 +591,7 @@ |
bool verify_domain_authentication_; |
static bool use_ssl_; |
- static bool use_flow_control_; |
+ static FlowControl use_flow_control_; |
static size_t init_max_concurrent_streams_; |
static size_t max_concurrent_stream_limit_; |