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

Side by Side Diff: net/http/http_network_session.cc

Issue 2751623002: Revert of Server push cancellation: add a finch trial parameter (patchset #14 id:280001 of https://… (Closed)
Patch Set: Created 3 years, 9 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 unified diff | Download patch
« no previous file with comments | « net/http/http_network_session.h ('k') | net/quic/core/quic_server_session_base_test.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "net/http/http_network_session.h" 5 #include "net/http/http_network_session.h"
6 6
7 #include <inttypes.h> 7 #include <inttypes.h>
8 8
9 #include <utility> 9 #include <utility>
10 10
(...skipping 380 matching lines...) Expand 10 before | Expand all | Expand 10 after
391 return params_.enable_http2; 391 return params_.enable_http2;
392 case kProtoQUIC: 392 case kProtoQUIC:
393 return IsQuicEnabled(); 393 return IsQuicEnabled();
394 } 394 }
395 NOTREACHED(); 395 NOTREACHED();
396 return false; 396 return false;
397 } 397 }
398 398
399 void HttpNetworkSession::SetServerPushDelegate( 399 void HttpNetworkSession::SetServerPushDelegate(
400 std::unique_ptr<ServerPushDelegate> push_delegate) { 400 std::unique_ptr<ServerPushDelegate> push_delegate) {
401 DCHECK(push_delegate); 401 DCHECK(!push_delegate_ && push_delegate);
402 if (!params_.enable_server_push_cancellation || push_delegate_)
403 return;
404 402
405 push_delegate_ = std::move(push_delegate); 403 push_delegate_ = std::move(push_delegate);
406 spdy_session_pool_.set_server_push_delegate(push_delegate_.get()); 404 spdy_session_pool_.set_server_push_delegate(push_delegate_.get());
407 quic_stream_factory_.set_server_push_delegate(push_delegate_.get()); 405 quic_stream_factory_.set_server_push_delegate(push_delegate_.get());
408 } 406 }
409 407
410 void HttpNetworkSession::GetAlpnProtos(NextProtoVector* alpn_protos) const { 408 void HttpNetworkSession::GetAlpnProtos(NextProtoVector* alpn_protos) const {
411 *alpn_protos = next_protos_; 409 *alpn_protos = next_protos_;
412 } 410 }
413 411
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
486 CloseIdleConnections(); 484 CloseIdleConnections();
487 break; 485 break;
488 } 486 }
489 } 487 }
490 488
491 void HttpNetworkSession::OnPurgeMemory() { 489 void HttpNetworkSession::OnPurgeMemory() {
492 CloseIdleConnections(); 490 CloseIdleConnections();
493 } 491 }
494 492
495 } // namespace net 493 } // namespace net
OLDNEW
« no previous file with comments | « net/http/http_network_session.h ('k') | net/quic/core/quic_server_session_base_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698