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

Unified Diff: net/quic/core/quic_server_session_base.cc

Issue 2350173005: QUIC enable server push by default. Guarded by FLAGS_quic_enable_server_push_by_default. (Closed)
Patch Set: Created 4 years, 3 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
« no previous file with comments | « net/quic/core/quic_server_session_base.h ('k') | net/quic/core/quic_server_session_base_test.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/quic/core/quic_server_session_base.cc
diff --git a/net/quic/core/quic_server_session_base.cc b/net/quic/core/quic_server_session_base.cc
index 7cdc014803ea17d0b388d3ae0f61da52dafd520c..419c105042db9734395ec5beda200514f293ea8f 100644
--- a/net/quic/core/quic_server_session_base.cc
+++ b/net/quic/core/quic_server_session_base.cc
@@ -31,8 +31,7 @@ QuicServerSessionBase::QuicServerSessionBase(
bandwidth_resumption_enabled_(false),
bandwidth_estimate_sent_to_client_(QuicBandwidth::Zero()),
last_scup_time_(QuicTime::Zero()),
- last_scup_packet_number_(0),
- server_push_enabled_(false) {}
+ last_scup_packet_number_(0) {}
QuicServerSessionBase::~QuicServerSessionBase() {}
@@ -56,8 +55,12 @@ void QuicServerSessionBase::OnConfigNegotiated() {
ContainsQuicTag(config()->ReceivedConnectionOptions(), kBWMX);
bandwidth_resumption_enabled_ =
last_bandwidth_resumption || max_bandwidth_resumption;
- server_push_enabled_ =
- ContainsQuicTag(config()->ReceivedConnectionOptions(), kSPSH);
+
+ if (!FLAGS_quic_enable_server_push_by_default ||
+ connection()->version() < QUIC_VERSION_35) {
+ set_server_push_enabled(
+ ContainsQuicTag(config()->ReceivedConnectionOptions(), kSPSH));
+ }
// If the client has provided a bandwidth estimate from the same serving
// region as this server, then decide whether to use the data for bandwidth
« no previous file with comments | « net/quic/core/quic_server_session_base.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