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

Unified Diff: net/http/http_network_session.cc

Issue 2521573006: Server push cancellation: change the ownership of ServerPushDelegate to HttpNetworkSession. (Closed)
Patch Set: rebase Created 4 years 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/http/http_network_session.h ('k') | net/quic/chromium/bidirectional_stream_quic_impl_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/http/http_network_session.cc
diff --git a/net/http/http_network_session.cc b/net/http/http_network_session.cc
index 7d6fc01cf3b268f2c05333124e51909ffab69e31..3b2ca28d9fe3fb33557f429cd546c39354303c1d 100644
--- a/net/http/http_network_session.cc
+++ b/net/http/http_network_session.cc
@@ -146,6 +146,7 @@ HttpNetworkSession::HttpNetworkSession(const Params& params)
http_auth_handler_factory_(params.http_auth_handler_factory),
proxy_service_(params.proxy_service),
ssl_config_service_(params.ssl_config_service),
+ push_delegate_(nullptr),
quic_stream_factory_(
params.net_log,
params.host_resolver,
@@ -363,6 +364,15 @@ bool HttpNetworkSession::IsProtocolEnabled(NextProto protocol) const {
return false;
}
+void HttpNetworkSession::SetServerPushDelegate(
+ std::unique_ptr<ServerPushDelegate> push_delegate) {
+ DCHECK(!push_delegate_ && push_delegate);
+
+ push_delegate_ = std::move(push_delegate);
+ spdy_session_pool_.set_server_push_delegate(push_delegate_.get());
+ quic_stream_factory_.set_server_push_delegate(push_delegate_.get());
+}
+
void HttpNetworkSession::GetAlpnProtos(NextProtoVector* alpn_protos) const {
*alpn_protos = next_protos_;
}
« no previous file with comments | « net/http/http_network_session.h ('k') | net/quic/chromium/bidirectional_stream_quic_impl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698