From 15632240a514d467a23a1bda309775b7150283fe Mon Sep 17 00:00:00 2001 From: Andrew Savage Date: Thu, 1 Aug 2024 15:49:40 -0400 Subject: [PATCH] Revert "Default quic to on for all platforms" (#3923) Reverts youtube/cobalt#3752 #3913 did not fully revert this and ended up not doing anything. b/348717754 --- cobalt/network/url_request_context.cc | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/cobalt/network/url_request_context.cc b/cobalt/network/url_request_context.cc index ab479bd2f993f..325d81b162eb9 100644 --- a/cobalt/network/url_request_context.cc +++ b/cobalt/network/url_request_context.cc @@ -209,8 +209,13 @@ URLRequestContext::URLRequestContext( quic::ParsedQuicVersionVector{quic::ParsedQuicVersion::Q046()}; url_request_context_builder->set_quic_context(std::move(quic_context)); - base::CommandLine* command_line = base::CommandLine::ForCurrentProcess(); - bool quic_enabled = !command_line->HasSwitch(switches::kDisableQuic); + bool quic_enabled = + configuration::Configuration::GetInstance()->CobaltEnableQuic(); + if (quic_enabled) { + base::CommandLine* command_line = base::CommandLine::ForCurrentProcess(); + quic_enabled = !command_line->HasSwitch(switches::kDisableQuic); + } + url_request_context_builder->SetSpdyAndQuicEnabled(/*spdy_enabled=*/true, quic_enabled);