summaryrefslogtreecommitdiffstats
path: root/net/spdy/spdy_session.h
diff options
context:
space:
mode:
Diffstat (limited to 'net/spdy/spdy_session.h')
-rw-r--r--net/spdy/spdy_session.h16
1 files changed, 14 insertions, 2 deletions
diff --git a/net/spdy/spdy_session.h b/net/spdy/spdy_session.h
index f2b260f..47c33f7 100644
--- a/net/spdy/spdy_session.h
+++ b/net/spdy/spdy_session.h
@@ -48,6 +48,16 @@ class SSLInfo;
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 @@ class NET_EXPORT SpdySession : public base::RefCounted<SpdySession>,
// 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 @@ class NET_EXPORT SpdySession : public base::RefCounted<SpdySession>,
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_;