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

Unified Diff: net/spdy/spdy_test_util_common.cc

Issue 1061853002: Emit session-level WINDOW_UPDATEs less frequently. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add test and loads of plumbing. Created 5 years, 8 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
« net/spdy/spdy_session.h ('K') | « net/spdy/spdy_test_util_common.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/spdy/spdy_test_util_common.cc
diff --git a/net/spdy/spdy_test_util_common.cc b/net/spdy/spdy_test_util_common.cc
index becdb9102ccd71dbd853e66a0874a7ee1498036c..44ac2896921af266c2dbcb3584983ba1c62e46ed 100644
--- a/net/spdy/spdy_test_util_common.cc
+++ b/net/spdy/spdy_test_util_common.cc
@@ -368,6 +368,7 @@ SpdySessionDependencies::SpdySessionDependencies(NextProto protocol)
enable_ping(false),
enable_user_alternate_protocol_ports(false),
protocol(protocol),
+ session_max_recv_window_size(SpdySession::GetInitialWindowSize(protocol)),
stream_initial_recv_window_size(
SpdySession::GetInitialWindowSize(protocol)),
time_func(&base::TimeTicks::Now),
@@ -402,6 +403,7 @@ SpdySessionDependencies::SpdySessionDependencies(NextProto protocol,
enable_ping(false),
enable_user_alternate_protocol_ports(false),
protocol(protocol),
+ session_max_recv_window_size(SpdySession::GetInitialWindowSize(protocol)),
stream_initial_recv_window_size(
SpdySession::GetInitialWindowSize(protocol)),
time_func(&base::TimeTicks::Now),
@@ -459,6 +461,8 @@ net::HttpNetworkSession::Params SpdySessionDependencies::CreateSessionParams(
params.enable_user_alternate_protocol_ports =
session_deps->enable_user_alternate_protocol_ports;
params.spdy_default_protocol = session_deps->protocol;
+ params.spdy_session_max_recv_window_size =
+ session_deps->session_max_recv_window_size;
params.spdy_stream_initial_recv_window_size =
session_deps->stream_initial_recv_window_size;
params.time_func = session_deps->time_func;
@@ -713,6 +717,14 @@ void SpdySessionPoolPeer::SetEnableSendingInitialData(bool enabled) {
pool_->enable_sending_initial_data_ = enabled;
}
+void SpdySessionPoolPeer::SetSessionMaxRecvWindowSize(size_t window) {
+ pool_->session_max_recv_window_size_ = window;
+}
+
+void SpdySessionPoolPeer::SetStreamInitialRecvWindowSize(size_t window) {
+ pool_->stream_initial_recv_window_size_ = window;
+}
+
SpdyTestUtil::SpdyTestUtil(NextProto protocol)
: protocol_(protocol),
spdy_version_(NextProtoToSpdyMajorVersion(protocol)) {
« net/spdy/spdy_session.h ('K') | « net/spdy/spdy_test_util_common.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698