summaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
Diffstat (limited to 'net')
-rw-r--r--net/http/http_network_session.cc4
-rw-r--r--net/http/http_network_session.h2
-rw-r--r--net/spdy/spdy_session.cc27
-rw-r--r--net/spdy/spdy_session.h39
-rw-r--r--net/spdy/spdy_session_pool.cc8
-rw-r--r--net/spdy/spdy_session_pool.h4
-rw-r--r--net/spdy/spdy_session_spdy3_unittest.cc4
-rw-r--r--net/spdy/spdy_stream.cc3
-rw-r--r--net/spdy/spdy_test_util_spdy3.cc7
-rw-r--r--net/spdy/spdy_test_util_spdy3.h2
10 files changed, 53 insertions, 47 deletions
diff --git a/net/http/http_network_session.cc b/net/http/http_network_session.cc
index eb6ac9b..2cc9e49 100644
--- a/net/http/http_network_session.cc
+++ b/net/http/http_network_session.cc
@@ -76,7 +76,7 @@ HttpNetworkSession::Params::Params()
enable_spdy_compression(true),
enable_spdy_ping_based_connection_checking(true),
spdy_default_protocol(kProtoUnknown),
- spdy_initial_recv_window_size(0),
+ spdy_stream_initial_recv_window_size(0),
spdy_initial_max_concurrent_streams(0),
spdy_max_concurrent_streams_limit(0),
time_func(&base::TimeTicks::Now),
@@ -121,7 +121,7 @@ HttpNetworkSession::HttpNetworkSession(const Params& params)
params.enable_spdy_compression,
params.enable_spdy_ping_based_connection_checking,
params.spdy_default_protocol,
- params.spdy_initial_recv_window_size,
+ params.spdy_stream_initial_recv_window_size,
params.spdy_initial_max_concurrent_streams,
params.spdy_max_concurrent_streams_limit,
params.time_func,
diff --git a/net/http/http_network_session.h b/net/http/http_network_session.h
index 26bb76a..c33fd67 100644
--- a/net/http/http_network_session.h
+++ b/net/http/http_network_session.h
@@ -76,7 +76,7 @@ class NET_EXPORT HttpNetworkSession
bool enable_spdy_compression;
bool enable_spdy_ping_based_connection_checking;
NextProto spdy_default_protocol;
- size_t spdy_initial_recv_window_size;
+ size_t spdy_stream_initial_recv_window_size;
size_t spdy_initial_max_concurrent_streams;
size_t spdy_max_concurrent_streams_limit;
SpdySessionPool::TimeFunc time_func;
diff --git a/net/spdy/spdy_session.cc b/net/spdy/spdy_session.cc
index 683a211..6a39067 100644
--- a/net/spdy/spdy_session.cc
+++ b/net/spdy/spdy_session.cc
@@ -221,7 +221,7 @@ SpdySession::SpdySession(const HostPortProxyPair& host_port_proxy_pair,
bool enable_compression,
bool enable_ping_based_connection_checking,
NextProto default_protocol,
- size_t initial_recv_window_size,
+ size_t stream_initial_recv_window_size,
size_t initial_max_concurrent_streams,
size_t max_concurrent_streams_limit,
TimeFunc time_func,
@@ -260,10 +260,10 @@ SpdySession::SpdySession(const HostPortProxyPair& host_port_proxy_pair,
last_activity_time_(base::TimeTicks::Now()),
check_ping_status_pending_(false),
flow_control_(false),
- initial_send_window_size_(kSpdyStreamInitialWindowSize),
- initial_recv_window_size_(initial_recv_window_size == 0 ?
- kDefaultInitialRecvWindowSize :
- initial_recv_window_size),
+ stream_initial_send_window_size_(kSpdyStreamInitialWindowSize),
+ stream_initial_recv_window_size_(stream_initial_recv_window_size == 0 ?
+ kDefaultInitialRecvWindowSize :
+ stream_initial_recv_window_size),
net_log_(BoundNetLog::Make(net_log, NetLog::SOURCE_SPDY_SESSION)),
verify_domain_authentication_(verify_domain_authentication),
enable_sending_initial_settings_(enable_sending_initial_settings),
@@ -546,8 +546,8 @@ int SpdySession::CreateStreamImpl(
stream->set_priority(priority);
stream->set_path(path);
- stream->set_send_window_size(initial_send_window_size_);
- stream->set_recv_window_size(initial_recv_window_size_);
+ stream->set_send_window_size(stream_initial_send_window_size_);
+ stream->set_recv_window_size(stream_initial_recv_window_size_);
created_streams_.insert(stream);
UMA_HISTOGRAM_CUSTOM_COUNTS("Net.SpdyPriorityCount",
@@ -1443,8 +1443,8 @@ void SpdySession::OnSynStream(SpdyStreamId stream_id,
stream->set_stream_id(stream_id);
stream->set_path(gurl.PathForRequest());
- stream->set_send_window_size(initial_send_window_size_);
- stream->set_recv_window_size(initial_recv_window_size_);
+ stream->set_send_window_size(stream_initial_send_window_size_);
+ stream->set_recv_window_size(stream_initial_recv_window_size_);
DeleteExpiredPushedStreams();
unclaimed_pushed_streams_[url] =
@@ -1713,9 +1713,10 @@ void SpdySession::SendInitialSettings() {
settings_map[SETTINGS_MAX_CONCURRENT_STREAMS] =
SettingsFlagsAndValue(SETTINGS_FLAG_NONE, kMaxConcurrentPushedStreams);
if (GetProtocolVersion() > 2 &&
- initial_recv_window_size_ != kSpdyStreamInitialWindowSize) {
+ stream_initial_recv_window_size_ != kSpdyStreamInitialWindowSize) {
settings_map[SETTINGS_INITIAL_WINDOW_SIZE] =
- SettingsFlagsAndValue(SETTINGS_FLAG_NONE, initial_recv_window_size_);
+ SettingsFlagsAndValue(SETTINGS_FLAG_NONE,
+ stream_initial_recv_window_size_);
}
SendSettings(settings_map);
}
@@ -1780,8 +1781,8 @@ void SpdySession::HandleSetting(uint32 id, uint32 value) {
NetLog::IntegerCallback("initial_window_size", value));
} else {
// SETTINGS_INITIAL_WINDOW_SIZE updates initial_send_window_size_ only.
- int32 delta_window_size = value - initial_send_window_size_;
- initial_send_window_size_ = value;
+ int32 delta_window_size = value - stream_initial_send_window_size_;
+ stream_initial_send_window_size_ = value;
UpdateStreamsSendWindowSize(delta_window_size);
net_log().AddEvent(
NetLog::TYPE_SPDY_SESSION_UPDATE_STREAMS_SEND_WINDOW_SIZE,
diff --git a/net/spdy/spdy_session.h b/net/spdy/spdy_session.h
index 5e907d6..8926235 100644
--- a/net/spdy/spdy_session.h
+++ b/net/spdy/spdy_session.h
@@ -144,7 +144,7 @@ class NET_EXPORT SpdySession : public base::RefCounted<SpdySession>,
bool enable_compression,
bool enable_ping_based_connection_checking,
NextProto default_protocol_,
- size_t initial_recv_window_size,
+ size_t stream_initial_recv_window_size,
size_t initial_max_concurrent_streams,
size_t max_concurrent_streams_limit,
TimeFunc time_func,
@@ -335,17 +335,19 @@ class NET_EXPORT SpdySession : public base::RefCounted<SpdySession>,
return flow_control_;
}
- // Returns the current |initial_send_window_size_|.
- int32 initial_send_window_size() const {
- return initial_send_window_size_;
+ // Returns the current |stream_initial_send_window_size_|.
+ int32 stream_initial_send_window_size() const {
+ return stream_initial_send_window_size_;
}
- // Returns the current |initial_recv_window_size_|.
- int32 initial_recv_window_size() const { return initial_recv_window_size_; }
+ // Returns the current |stream_initial_recv_window_size_|.
+ int32 stream_initial_recv_window_size() const {
+ return stream_initial_recv_window_size_;
+ }
- // Sets |initial_recv_window_size_| used by unittests.
+ // Sets |stream_initial_recv_window_size_| used by unittests.
void set_initial_recv_window_size(int32 window_size) {
- initial_recv_window_size_ = window_size;
+ stream_initial_recv_window_size_ = window_size;
}
const BoundNetLog& net_log() const { return net_log_; }
@@ -725,16 +727,17 @@ class NET_EXPORT SpdySession : public base::RefCounted<SpdySession>,
// 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.
- int32 initial_send_window_size_;
-
- // Initial receive window size for the session; there are plans to add a
- // command line switch that would cause a SETTINGS frame with window size
- // announcement to be sent on startup; newly created streams will use
- // this value for the initial receive window size.
- int32 initial_recv_window_size_;
+ // Initial send window size for this session's streams. Can be
+ // changed by an arriving SETTINGS frame. Newly created streams use
+ // this value for the initial send window size.
+ int32 stream_initial_send_window_size_;
+
+ // Initial receive window size for this session's streams. There are
+ // plans to add a command line switch that would cause a SETTINGS
+ // frame with window size announcement to be sent on startup. Newly
+ // created streams will use this value for the initial receive
+ // window size.
+ int32 stream_initial_recv_window_size_;
BoundNetLog net_log_;
diff --git a/net/spdy/spdy_session_pool.cc b/net/spdy/spdy_session_pool.cc
index b967a46..ffd083a 100644
--- a/net/spdy/spdy_session_pool.cc
+++ b/net/spdy/spdy_session_pool.cc
@@ -47,7 +47,7 @@ SpdySessionPool::SpdySessionPool(
bool enable_compression,
bool enable_ping_based_connection_checking,
NextProto default_protocol,
- size_t initial_recv_window_size,
+ size_t stream_initial_recv_window_size,
size_t initial_max_concurrent_streams,
size_t max_concurrent_streams_limit,
SpdySessionPool::TimeFunc time_func,
@@ -67,7 +67,7 @@ SpdySessionPool::SpdySessionPool(
enable_ping_based_connection_checking_(
enable_ping_based_connection_checking),
default_protocol_(default_protocol),
- initial_recv_window_size_(initial_recv_window_size),
+ stream_initial_recv_window_size_(stream_initial_recv_window_size),
initial_max_concurrent_streams_(initial_max_concurrent_streams),
max_concurrent_streams_limit_(max_concurrent_streams_limit),
time_func_(time_func),
@@ -149,7 +149,7 @@ scoped_refptr<SpdySession> SpdySessionPool::GetInternal(
enable_compression_,
enable_ping_based_connection_checking_,
default_protocol_,
- initial_recv_window_size_,
+ stream_initial_recv_window_size_,
initial_max_concurrent_streams_,
max_concurrent_streams_limit_,
time_func_,
@@ -185,7 +185,7 @@ net::Error SpdySessionPool::GetSpdySessionFromSocket(
enable_compression_,
enable_ping_based_connection_checking_,
default_protocol_,
- initial_recv_window_size_,
+ stream_initial_recv_window_size_,
initial_max_concurrent_streams_,
max_concurrent_streams_limit_,
time_func_,
diff --git a/net/spdy/spdy_session_pool.h b/net/spdy/spdy_session_pool.h
index 0467583..fee6779 100644
--- a/net/spdy/spdy_session_pool.h
+++ b/net/spdy/spdy_session_pool.h
@@ -58,7 +58,7 @@ class NET_EXPORT SpdySessionPool
bool enable_compression,
bool enable_ping_based_connection_checking,
NextProto default_protocol,
- size_t default_initial_recv_window_size,
+ size_t stream_initial_recv_window_size,
size_t initial_max_concurrent_streams,
size_t max_concurrent_streams_limit,
SpdySessionPool::TimeFunc time_func,
@@ -213,7 +213,7 @@ class NET_EXPORT SpdySessionPool
bool enable_compression_;
bool enable_ping_based_connection_checking_;
NextProto default_protocol_;
- size_t initial_recv_window_size_;
+ size_t stream_initial_recv_window_size_;
size_t initial_max_concurrent_streams_;
size_t max_concurrent_streams_limit_;
TimeFunc time_func_;
diff --git a/net/spdy/spdy_session_spdy3_unittest.cc b/net/spdy/spdy_session_spdy3_unittest.cc
index bfc3d0a6..f56b65b 100644
--- a/net/spdy/spdy_session_spdy3_unittest.cc
+++ b/net/spdy/spdy_session_spdy3_unittest.cc
@@ -724,7 +724,7 @@ TEST_F(SpdySessionSpdy3Test, SendInitialSettingsOnNewSession) {
MockWrite writes[] = {
CreateMockWrite(*settings_frame),
};
- session_deps_.initial_recv_window_size = kInitialRecvWindowSize;
+ session_deps_.stream_initial_recv_window_size = kInitialRecvWindowSize;
StaticSocketDataProvider data(
reads, arraysize(reads), writes, arraysize(writes));
@@ -1740,7 +1740,7 @@ TEST_F(SpdySessionSpdy3Test, UpdateStreamsSendWindowSize) {
data->RunFor(1); // Process the SETTINGS frame, but not the EOF
MessageLoop::current()->RunUntilIdle();
- EXPECT_EQ(session->initial_send_window_size(), window_size);
+ EXPECT_EQ(session->stream_initial_send_window_size(), window_size);
EXPECT_EQ(spdy_stream1->send_window_size(), window_size);
// Release the first one, this will allow the second to be created.
diff --git a/net/spdy/spdy_stream.cc b/net/spdy/spdy_stream.cc
index ebbc1d2..3262487 100644
--- a/net/spdy/spdy_stream.cc
+++ b/net/spdy/spdy_stream.cc
@@ -323,7 +323,8 @@ void SpdyStream::IncreaseRecvWindowSize(int32 delta_window_size) {
stream_id_, delta_window_size, recv_window_size_));
unacked_recv_window_bytes_ += delta_window_size;
- if (unacked_recv_window_bytes_ > session_->initial_recv_window_size() / 2) {
+ if (unacked_recv_window_bytes_ >
+ session_->stream_initial_recv_window_size() / 2) {
session_->SendWindowUpdate(stream_id_, unacked_recv_window_bytes_);
unacked_recv_window_bytes_ = 0;
}
diff --git a/net/spdy/spdy_test_util_spdy3.cc b/net/spdy/spdy_test_util_spdy3.cc
index f2e09f8..1fb3c28 100644
--- a/net/spdy/spdy_test_util_spdy3.cc
+++ b/net/spdy/spdy_test_util_spdy3.cc
@@ -905,7 +905,7 @@ SpdySessionDependencies::SpdySessionDependencies()
enable_compression(false),
enable_ping(false),
enable_user_alternate_protocol_ports(false),
- initial_recv_window_size(kSpdyStreamInitialWindowSize),
+ stream_initial_recv_window_size(kSpdyStreamInitialWindowSize),
time_func(&base::TimeTicks::Now),
net_log(NULL) {
// Note: The CancelledTransaction test does cleanup by running all
@@ -930,7 +930,7 @@ SpdySessionDependencies::SpdySessionDependencies(ProxyService* proxy_service)
enable_compression(false),
enable_ping(false),
enable_user_alternate_protocol_ports(false),
- initial_recv_window_size(kSpdyStreamInitialWindowSize),
+ stream_initial_recv_window_size(kSpdyStreamInitialWindowSize),
time_func(&base::TimeTicks::Now),
net_log(NULL) {}
@@ -975,7 +975,8 @@ net::HttpNetworkSession::Params SpdySessionDependencies::CreateSessionParams(
params.enable_user_alternate_protocol_ports =
session_deps->enable_user_alternate_protocol_ports;
params.spdy_default_protocol = kProtoSPDY3;
- params.spdy_initial_recv_window_size = session_deps->initial_recv_window_size;
+ params.spdy_stream_initial_recv_window_size =
+ session_deps->stream_initial_recv_window_size;
params.time_func = session_deps->time_func;
params.trusted_spdy_proxy = session_deps->trusted_spdy_proxy;
params.net_log = session_deps->net_log;
diff --git a/net/spdy/spdy_test_util_spdy3.h b/net/spdy/spdy_test_util_spdy3.h
index b12f5e2..1c627a3 100644
--- a/net/spdy/spdy_test_util_spdy3.h
+++ b/net/spdy/spdy_test_util_spdy3.h
@@ -409,7 +409,7 @@ struct SpdySessionDependencies {
bool enable_compression;
bool enable_ping;
bool enable_user_alternate_protocol_ports;
- size_t initial_recv_window_size;
+ size_t stream_initial_recv_window_size;
SpdySession::TimeFunc time_func;
std::string trusted_spdy_proxy;
NetLog* net_log;