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

Unified Diff: net/spdy/spdy_session.h

Issue 9252029: SPDY - default to SPDY/2.1 protocol in unittests (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: sync with trunk Created 8 years, 11 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/spdy/spdy_network_transaction_unittest.cc ('k') | net/spdy/spdy_session.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_;
« no previous file with comments | « net/spdy/spdy_network_transaction_unittest.cc ('k') | net/spdy/spdy_session.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698