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

Unified Diff: net/spdy/spdy_session.cc

Issue 515353002: Ignore persisent settings on SPDY4. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Disable a |server_settings_frame| expectation only in unittest. Created 6 years, 4 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 | « no previous file | 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 8c0a5daac7f6acc3079a3599331683badb3f6f7c..f1c454071f8de310d12e1b55fd6613b828c1ee2b 100644
--- a/net/spdy/spdy_session.cc
+++ b/net/spdy/spdy_session.cc
@@ -2735,27 +2735,29 @@ void SpdySession::SendInitialData() {
kDefaultInitialRecvWindowSize - session_recv_window_size_);
}
- // Finally, notify the server about the settings they have
- // previously told us to use when communicating with them (after
- // applying them).
- const SettingsMap& server_settings_map =
- http_server_properties_->GetSpdySettings(host_port_pair());
- if (server_settings_map.empty())
- return;
+ if (protocol_ <= kProtoSPDY31) {
+ // Finally, notify the server about the settings they have
+ // previously told us to use when communicating with them (after
+ // applying them).
+ const SettingsMap& server_settings_map =
+ http_server_properties_->GetSpdySettings(host_port_pair());
+ if (server_settings_map.empty())
+ return;
- SettingsMap::const_iterator it =
- server_settings_map.find(SETTINGS_CURRENT_CWND);
- uint32 cwnd = (it != server_settings_map.end()) ? it->second.second : 0;
- UMA_HISTOGRAM_CUSTOM_COUNTS("Net.SpdySettingsCwndSent", cwnd, 1, 200, 100);
+ SettingsMap::const_iterator it =
+ server_settings_map.find(SETTINGS_CURRENT_CWND);
+ uint32 cwnd = (it != server_settings_map.end()) ? it->second.second : 0;
+ UMA_HISTOGRAM_CUSTOM_COUNTS("Net.SpdySettingsCwndSent", cwnd, 1, 200, 100);
- for (SettingsMap::const_iterator it = server_settings_map.begin();
- it != server_settings_map.end(); ++it) {
- const SpdySettingsIds new_id = it->first;
- const uint32 new_val = it->second.second;
- HandleSetting(new_id, new_val);
- }
+ for (SettingsMap::const_iterator it = server_settings_map.begin();
+ it != server_settings_map.end(); ++it) {
+ const SpdySettingsIds new_id = it->first;
+ const uint32 new_val = it->second.second;
+ HandleSetting(new_id, new_val);
+ }
- SendSettings(server_settings_map);
+ SendSettings(server_settings_map);
+ }
}
« no previous file with comments | « no previous file | net/spdy/spdy_session_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698