Commit 1c76e038 authored by David Schinazi's avatar David Schinazi Committed by Commit Bot

Remove kDefaultSupportedQuicVersion in favor of DefaultSupportedQuicVersions()

This change cleans up the codebase and prepares us for using
multiple versions in DefaultSupportedQuicVersions(). Our current
plan is to eventually set it to (h3-29,h3-Q050) if our latest
experiments in Stable go as planned.

R=renjietang@chromium.org

Change-Id: Ie1f6b35b42df07f65a8d800616e8f34427282913
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2419150
Commit-Queue: David Schinazi <dschinazi@chromium.org>
Commit-Queue: Renjie Tang <renjietang@chromium.org>
Auto-Submit: David Schinazi <dschinazi@chromium.org>
Reviewed-by: default avatarRenjie Tang <renjietang@chromium.org>
Cr-Commit-Position: refs/heads/master@{#808619}
parent 3a35d2fa
...@@ -448,9 +448,8 @@ TEST(URLRequestContextConfigTest, SetUnsupportedQuicVersion) { ...@@ -448,9 +448,8 @@ TEST(URLRequestContextConfigTest, SetUnsupportedQuicVersion) {
net::ProxyConfigWithAnnotation::CreateDirect())); net::ProxyConfigWithAnnotation::CreateDirect()));
std::unique_ptr<net::URLRequestContext> context(builder.Build()); std::unique_ptr<net::URLRequestContext> context(builder.Build());
const net::QuicParams* quic_params = context->quic_context()->params(); const net::QuicParams* quic_params = context->quic_context()->params();
EXPECT_EQ(quic_params->supported_versions.size(), 1u); EXPECT_EQ(quic_params->supported_versions,
EXPECT_EQ(quic_params->supported_versions[0], net::DefaultSupportedQuicVersions());
net::kDefaultSupportedQuicVersion);
} }
TEST(URLRequestContextConfigTest, SetQuicServerMigrationOptions) { TEST(URLRequestContextConfigTest, SetQuicServerMigrationOptions) {
......
...@@ -12,14 +12,10 @@ ...@@ -12,14 +12,10 @@
namespace net { namespace net {
// Default QUIC version used in absence of any external configuration. // Default QUIC supprted versions used in absence of any external configuration.
constexpr quic::ParsedQuicVersion kDefaultSupportedQuicVersion =
quic::ParsedQuicVersion::Q050();
// Returns a list containing only the current default version.
inline NET_EXPORT_PRIVATE quic::ParsedQuicVersionVector inline NET_EXPORT_PRIVATE quic::ParsedQuicVersionVector
DefaultSupportedQuicVersions() { DefaultSupportedQuicVersions() {
return quic::ParsedQuicVersionVector{kDefaultSupportedQuicVersion}; return quic::ParsedQuicVersionVector{quic::ParsedQuicVersion::Q050()};
} }
// When a connection is idle for 30 seconds it will be closed. // When a connection is idle for 30 seconds it will be closed.
......
...@@ -81,7 +81,8 @@ std::unique_ptr<test_server::HttpResponse> HandleRequest( ...@@ -81,7 +81,8 @@ std::unique_ptr<test_server::HttpResponse> HandleRequest(
const test_server::HttpRequest& request) { const test_server::HttpRequest& request) {
std::unique_ptr<test_server::BasicHttpResponse> http_response( std::unique_ptr<test_server::BasicHttpResponse> http_response(
new test_server::BasicHttpResponse()); new test_server::BasicHttpResponse());
std::string alpn = quic::AlpnForVersion(kDefaultSupportedQuicVersion); std::string alpn =
quic::AlpnForVersion(DefaultSupportedQuicVersions().front());
http_response->AddCustomHeader( http_response->AddCustomHeader(
"Alt-Svc", base::StringPrintf("%s=\"%s:%d\"", alpn.c_str(), kAltSvcHost, "Alt-Svc", base::StringPrintf("%s=\"%s:%d\"", alpn.c_str(), kAltSvcHost,
kAltSvcPort)); kAltSvcPort));
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment