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

Unified Diff: net/spdy/spdy_session_unittest.cc

Issue 8423028: Persist dynamically learned SPDY settings (like CWND). (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 1 month 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_session_pool.cc ('k') | net/spdy/spdy_websocket_stream_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/spdy/spdy_session_unittest.cc
===================================================================
--- net/spdy/spdy_session_unittest.cc (revision 110097)
+++ net/spdy/spdy_session_unittest.cc (working copy)
@@ -538,7 +538,7 @@
spdy::SpdySettings old_settings;
id.set_flags(spdy::SETTINGS_FLAG_PLEASE_PERSIST);
old_settings.push_back(spdy::SpdySetting(id, 1));
- spdy_session_pool->mutable_spdy_settings()->Set(
+ spdy_session_pool->http_server_properties()->SetSpdySettings(
test_host_port_pair, old_settings);
// Create a session.
@@ -624,7 +624,7 @@
id.set_id(spdy::SETTINGS_MAX_CONCURRENT_STREAMS);
id.set_flags(spdy::SETTINGS_FLAG_PLEASE_PERSIST);
settings.push_back(spdy::SpdySetting(id, 1));
- spdy_session_pool->mutable_spdy_settings()->Set(
+ spdy_session_pool->http_server_properties()->SetSpdySettings(
test_host_port_pair, settings);
// Create a session.
@@ -726,7 +726,7 @@
settings.clear();
settings.push_back(spdy::SpdySetting(id, kBogusSettingValue));
SpdySessionPool* spdy_session_pool(http_session->spdy_session_pool());
- spdy_session_pool->mutable_spdy_settings()->Set(
+ spdy_session_pool->http_server_properties()->SetSpdySettings(
test_host_port_pair, settings);
EXPECT_FALSE(spdy_session_pool->HasSession(pair));
scoped_refptr<SpdySession> session =
@@ -905,8 +905,8 @@
SpdySessionDependencies::SpdyCreateSession(&session_deps));
SpdySessionPool* spdy_session_pool(http_session->spdy_session_pool());
- SpdySettingsStorage* test_settings_storage =
- spdy_session_pool->mutable_spdy_settings();
+ HttpServerProperties* test_http_server_properties =
+ spdy_session_pool->http_server_properties();
spdy::SettingsFlagsAndId id(0);
id.set_id(spdy::SETTINGS_MAX_CONCURRENT_STREAMS);
id.set_flags(spdy::SETTINGS_FLAG_PLEASE_PERSIST);
@@ -914,10 +914,13 @@
spdy::SpdySettings test_settings;
test_settings.push_back(spdy::SpdySetting(id, max_concurrent_streams));
- test_settings_storage->Set(test_host_port_pair, test_settings);
- EXPECT_NE(0u, test_settings_storage->Get(test_host_port_pair).size());
+ test_http_server_properties->SetSpdySettings(test_host_port_pair,
+ test_settings);
+ EXPECT_NE(0u, test_http_server_properties->GetSpdySettings(
+ test_host_port_pair).size());
spdy_session_pool->OnIPAddressChanged();
- EXPECT_EQ(0u, test_settings_storage->Get(test_host_port_pair).size());
+ EXPECT_EQ(0u, test_http_server_properties->GetSpdySettings(
+ test_host_port_pair).size());
}
} // namespace net
« no previous file with comments | « net/spdy/spdy_session_pool.cc ('k') | net/spdy/spdy_websocket_stream_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698