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

Unified Diff: net/spdy/spdy_session.cc

Issue 17760008: [SPDY] Enable tests for SPDY/3.1 and SPDY/4 (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address comments Created 7 years, 6 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_proxy_client_socket_unittest.cc ('k') | net/spdy/spdy_session_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/spdy/spdy_session.cc
diff --git a/net/spdy/spdy_session.cc b/net/spdy/spdy_session.cc
index a1fc2935eb6c56eba1deb7c9346a6af08d6257ca..fe36e65a1f5cd15bb878b417c3aa24e7312e7b60 100644
--- a/net/spdy/spdy_session.cc
+++ b/net/spdy/spdy_session.cc
@@ -484,18 +484,6 @@ Error SpdySession::InitializeWithSocket(
SendInitialSettings();
UMA_HISTOGRAM_ENUMERATION("Net.SpdyVersion", protocol, kProtoMaximumVersion);
- if (flow_control_state_ == FLOW_CONTROL_STREAM_AND_SESSION) {
- // Bump up the receive window size to the real initial value. This
- // has to go here since the WINDOW_UPDATE frame sent by
- // IncreaseRecvWindowSize() call uses |buffered_spdy_framer_|.
- DCHECK_GT(kDefaultInitialRecvWindowSize, session_recv_window_size_);
- // This condition implies that |kDefaultInitialRecvWindowSize| -
- // |session_recv_window_size_| doesn't overflow.
- DCHECK_GT(session_recv_window_size_, 0);
- IncreaseRecvWindowSize(
- kDefaultInitialRecvWindowSize - session_recv_window_size_);
- }
-
net_log_.AddEvent(
NetLog::TYPE_SPDY_SESSION_INITIALIZED,
connection_->socket()->NetLog().source().ToEventParametersCallback());
@@ -2083,7 +2071,7 @@ void SpdySession::SendStreamWindowUpdate(SpdyStreamId stream_id,
}
void SpdySession::SendInitialSettings() {
- // First notify the server about the settings they should use when
+ // First, notify the server about the settings they should use when
// communicating with us.
if (GetProtocolVersion() >= 2 && enable_sending_initial_settings_) {
SettingsMap settings_map;
@@ -2100,7 +2088,21 @@ void SpdySession::SendInitialSettings() {
SendSettings(settings_map);
}
- // Next notify the server about the settings they have previously
+ // Next, notify the server about our initial recv window size.
+ if (flow_control_state_ == FLOW_CONTROL_STREAM_AND_SESSION &&
+ enable_sending_initial_settings_) {
+ // Bump up the receive window size to the real initial value. This
+ // has to go here since the WINDOW_UPDATE frame sent by
+ // IncreaseRecvWindowSize() call uses |buffered_spdy_framer_|.
+ DCHECK_GT(kDefaultInitialRecvWindowSize, session_recv_window_size_);
+ // This condition implies that |kDefaultInitialRecvWindowSize| -
+ // |session_recv_window_size_| doesn't overflow.
+ DCHECK_GT(session_recv_window_size_, 0);
+ IncreaseRecvWindowSize(
+ kDefaultInitialRecvWindowSize - session_recv_window_size_);
+ }
+
+ // Finally, notify the server about the settings they have previously
// told us to use when communicating with them.
const SettingsMap& settings_map =
http_server_properties_->GetSpdySettings(host_port_pair());
« no previous file with comments | « net/spdy/spdy_proxy_client_socket_unittest.cc ('k') | net/spdy/spdy_session_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698