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

Unified Diff: net/spdy/spdy_session_pool.cc

Issue 2678353003: Close idle H2 sockets when SpdySession is initialized. (Closed)
Patch Set: Self Created 3 years, 10 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
Index: net/spdy/spdy_session_pool.cc
diff --git a/net/spdy/spdy_session_pool.cc b/net/spdy/spdy_session_pool.cc
index 1a594d0cb7bda48e16f9926124411e1d5e370a12..828469033d8c47c02ab281248d3fbb5f3ae3fefd 100644
--- a/net/spdy/spdy_session_pool.cc
+++ b/net/spdy/spdy_session_pool.cc
@@ -44,6 +44,7 @@ SpdySessionPool::SpdySessionPool(
SSLConfigService* ssl_config_service,
HttpServerProperties* http_server_properties,
TransportSecurityState* transport_security_state,
+ HttpNetworkSession* http_network_session,
bool enable_ping_based_connection_checking,
size_t session_max_recv_window_size,
const SettingsMap& initial_settings,
@@ -51,6 +52,7 @@ SpdySessionPool::SpdySessionPool(
ProxyDelegate* proxy_delegate)
: http_server_properties_(http_server_properties),
transport_security_state_(transport_security_state),
+ http_network_session_(http_network_session),
ssl_config_service_(ssl_config_service),
resolver_(resolver),
enable_sending_initial_data_(true),
@@ -95,9 +97,10 @@ base::WeakPtr<SpdySession> SpdySessionPool::CreateAvailableSessionFromSocket(
auto new_session = base::MakeUnique<SpdySession>(
key, http_server_properties_, transport_security_state_,
- enable_sending_initial_data_, enable_ping_based_connection_checking_,
- session_max_recv_window_size_, initial_settings_, time_func_,
- push_delegate_, proxy_delegate_, net_log.net_log());
+ http_network_session_, enable_sending_initial_data_,
+ enable_ping_based_connection_checking_, session_max_recv_window_size_,
+ initial_settings_, time_func_, push_delegate_, proxy_delegate_,
+ net_log.net_log());
new_session->InitializeWithSocket(std::move(connection), this, is_secure);

Powered by Google App Engine
This is Rietveld 408576698