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

Unified Diff: net/http/http_network_session.cc

Issue 2692813002: Server push cancellation: add a finch trial parameter (Closed)
Patch Set: sync with internal code 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/http/http_network_session.cc
diff --git a/net/http/http_network_session.cc b/net/http/http_network_session.cc
index fda084eab56900bcf246229fa108e0e9c72f91f0..ef6bd7acb4adcc8da2bd16eaea072b354c027286 100644
--- a/net/http/http_network_session.cc
+++ b/net/http/http_network_session.cc
@@ -396,7 +396,9 @@ bool HttpNetworkSession::IsProtocolEnabled(NextProto protocol) const {
void HttpNetworkSession::SetServerPushDelegate(
std::unique_ptr<ServerPushDelegate> push_delegate) {
- DCHECK(!push_delegate_ && push_delegate);
+ DCHECK(push_delegate);
+ if (!params_.enable_server_push_cancellation || push_delegate_)
+ return;
push_delegate_ = std::move(push_delegate);
spdy_session_pool_.set_server_push_delegate(push_delegate_.get());

Powered by Google App Engine
This is Rietveld 408576698