Commit c33aefe2 authored by David Schinazi's avatar David Schinazi Committed by Commit Bot

Roll src/net/third_party/quiche/src/ c3316f30c..a66f68433 (3 commits)

https://quiche.googlesource.com/quiche.git/+log/c3316f30c075..a66f68433ddd

$ git log c3316f30c..a66f68433 --date=short --no-merges --format='%ad %ae %s'
2020-03-06 fayang gfe-relnote: In QUIC, let GetMinAckFrameSize use actual ack_frame instead of passed in largest_observed_length. Protected by gfe2_reloadable_flag_quic_use_ack_frame_to_get_min_size.
2020-03-05 danzh gfe-relnote: move stop/start accepting new connection feature from GfeQuicDispatcher to QuicDispatcher. Protected by --gfe2_restart_flag_quic_should_accept_new_connection.
2020-03-05 dschinazi Add --quic_versions to QuicToyServer and improve version parsing

Created with:
  roll-dep src/net/third_party/quiche/src src/third_party/quic_trace/src

Change-Id: I8d3bf48892dcfb8e8ffce8c62f4d7f244bd7067f
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2091221
Commit-Queue: David Schinazi <dschinazi@chromium.org>
Commit-Queue: Nick Harper <nharper@chromium.org>
Auto-Submit: David Schinazi <dschinazi@chromium.org>
Reviewed-by: default avatarNick Harper <nharper@chromium.org>
Cr-Commit-Position: refs/heads/master@{#747895}
parent 0e2f41df
...@@ -306,7 +306,7 @@ vars = { ...@@ -306,7 +306,7 @@ vars = {
# Three lines of non-changing comments so that # Three lines of non-changing comments so that
# the commit queue can handle CLs rolling feed # the commit queue can handle CLs rolling feed
# and whatever else without interference from each other. # and whatever else without interference from each other.
'quiche_revision': 'c3316f30c075206c876096435de47add03d692a6', 'quiche_revision': 'a66f68433ddd57305e5c116101d4cd59091bed37',
# Three lines of non-changing comments so that # Three lines of non-changing comments so that
# the commit queue can handle CLs rolling ios_webkit # the commit queue can handle CLs rolling ios_webkit
# and whatever else without interference from each other. # and whatever else without interference from each other.
......
...@@ -316,7 +316,7 @@ void URLRequestContextConfig::ParseAndSetExperimentalOptions( ...@@ -316,7 +316,7 @@ void URLRequestContextConfig::ParseAndSetExperimentalOptions(
std::string quic_version_string; std::string quic_version_string;
if (quic_args->GetString(kQuicVersion, &quic_version_string)) { if (quic_args->GetString(kQuicVersion, &quic_version_string)) {
quic::ParsedQuicVersionVector supported_versions = quic::ParsedQuicVersionVector supported_versions =
net::ParseQuicVersions(quic_version_string); quic::ParseQuicVersionVectorString(quic_version_string);
if (!supported_versions.empty()) if (!supported_versions.empty())
quic_params->supported_versions = supported_versions; quic_params->supported_versions = supported_versions;
} }
......
...@@ -454,7 +454,7 @@ size_t GetQuicMaxPacketLength(const VariationParameters& quic_trial_params) { ...@@ -454,7 +454,7 @@ size_t GetQuicMaxPacketLength(const VariationParameters& quic_trial_params) {
quic::ParsedQuicVersionVector GetQuicVersions( quic::ParsedQuicVersionVector GetQuicVersions(
const VariationParameters& quic_trial_params) { const VariationParameters& quic_trial_params) {
return net::ParseQuicVersions( return quic::ParseQuicVersionVectorString(
GetVariationParam(quic_trial_params, "quic_version")); GetVariationParam(quic_trial_params, "quic_version"));
} }
...@@ -646,8 +646,9 @@ void ParseCommandLineAndFieldTrials(const base::CommandLine& command_line, ...@@ -646,8 +646,9 @@ void ParseCommandLineAndFieldTrials(const base::CommandLine& command_line,
} }
if (command_line.HasSwitch(switches::kQuicVersion)) { if (command_line.HasSwitch(switches::kQuicVersion)) {
quic::ParsedQuicVersionVector supported_versions = net::ParseQuicVersions( quic::ParsedQuicVersionVector supported_versions =
command_line.GetSwitchValueASCII(switches::kQuicVersion)); quic::ParseQuicVersionVectorString(
command_line.GetSwitchValueASCII(switches::kQuicVersion));
if (!supported_versions.empty()) if (!supported_versions.empty())
quic_params->supported_versions = supported_versions; quic_params->supported_versions = supported_versions;
} }
......
...@@ -376,3 +376,9 @@ QUIC_FLAG(bool, ...@@ -376,3 +376,9 @@ QUIC_FLAG(bool,
QUIC_FLAG(bool, QUIC_FLAG(bool,
FLAGS_quic_reloadable_flag_quic_bbr2_avoid_unnecessary_probe_rtt, FLAGS_quic_reloadable_flag_quic_bbr2_avoid_unnecessary_probe_rtt,
false) false)
// If true, use passed in ack_frame to calculate minimum size of the serialized
// ACK frame.
QUIC_FLAG(bool,
FLAGS_quic_reloadable_flag_quic_use_ack_frame_to_get_min_size,
false)
...@@ -28,29 +28,4 @@ quic::QuicTagVector ParseQuicConnectionOptions( ...@@ -28,29 +28,4 @@ quic::QuicTagVector ParseQuicConnectionOptions(
return options; return options;
} }
quic::ParsedQuicVersionVector ParseQuicVersions(
const std::string& quic_versions) {
quic::ParsedQuicVersionVector all_supported_versions =
quic::AllSupportedVersions();
quic::ParsedQuicVersionVector parsed_versions;
for (const base::StringPiece& version_string : base::SplitStringPiece(
quic_versions, ",", base::TRIM_WHITESPACE, base::SPLIT_WANT_ALL)) {
auto it = all_supported_versions.begin();
while (it != all_supported_versions.end()) {
if ((it->handshake_protocol == quic::PROTOCOL_QUIC_CRYPTO &&
quic::QuicVersionToString(it->transport_version) ==
version_string) ||
quic::AlpnForVersion(*it) == version_string) {
parsed_versions.push_back(*it);
// Remove the supported version to deduplicate versions extracted from
// |quic_versions|.
all_supported_versions.erase(it);
break;
}
it++;
}
}
return parsed_versions;
}
} // namespace net } // namespace net
...@@ -21,11 +21,6 @@ namespace net { ...@@ -21,11 +21,6 @@ namespace net {
NET_EXPORT quic::QuicTagVector ParseQuicConnectionOptions( NET_EXPORT quic::QuicTagVector ParseQuicConnectionOptions(
const std::string& connection_options); const std::string& connection_options);
// Returns the list of QUIC versions represented by the comma separated
// string in |quic_versions|.
NET_EXPORT quic::ParsedQuicVersionVector ParseQuicVersions(
const std::string& quic_versions);
} // namespace net } // namespace net
#endif // NET_QUIC_QUIC_UTILS_CHROMIUM_H_ #endif // NET_QUIC_QUIC_UTILS_CHROMIUM_H_
...@@ -30,55 +30,6 @@ TEST(QuicUtilsChromiumTest, ParseQuicConnectionOptions) { ...@@ -30,55 +30,6 @@ TEST(QuicUtilsChromiumTest, ParseQuicConnectionOptions) {
EXPECT_EQ(expected_options, parsed_options); EXPECT_EQ(expected_options, parsed_options);
} }
TEST(QuicUtilsChromiumTest, ParseQuicVersions) {
EXPECT_THAT(ParseQuicVersions(""), IsEmpty());
quic::ParsedQuicVersion expected_version1 = {quic::PROTOCOL_QUIC_CRYPTO,
quic::QUIC_VERSION_50};
EXPECT_THAT(ParseQuicVersions("QUIC_VERSION_50"),
ElementsAre(expected_version1));
EXPECT_THAT(ParseQuicVersions("h3-Q050"), ElementsAre(expected_version1));
quic::ParsedQuicVersion expected_version2 = {quic::PROTOCOL_TLS1_3,
quic::QUIC_VERSION_50};
EXPECT_THAT(ParseQuicVersions("h3-T050"), ElementsAre(expected_version2));
EXPECT_THAT(ParseQuicVersions("h3-Q050, h3-T050"),
ElementsAre(expected_version1, expected_version2));
EXPECT_THAT(ParseQuicVersions("h3-T050, h3-Q050"),
ElementsAre(expected_version2, expected_version1));
EXPECT_THAT(ParseQuicVersions("QUIC_VERSION_50,h3-T050"),
ElementsAre(expected_version1, expected_version2));
EXPECT_THAT(ParseQuicVersions("h3-T050,QUIC_VERSION_50"),
ElementsAre(expected_version2, expected_version1));
EXPECT_THAT(ParseQuicVersions("QUIC_VERSION_50, h3-T050"),
ElementsAre(expected_version1, expected_version2));
EXPECT_THAT(ParseQuicVersions("h3-T050, QUIC_VERSION_50"),
ElementsAre(expected_version2, expected_version1));
quic::ParsedQuicVersion expected_version3 = {quic::PROTOCOL_QUIC_CRYPTO,
quic::QUIC_VERSION_49};
EXPECT_THAT(ParseQuicVersions("QUIC_VERSION_50,QUIC_VERSION_49"),
ElementsAre(expected_version1, expected_version3));
EXPECT_THAT(ParseQuicVersions("QUIC_VERSION_49,QUIC_VERSION_50"),
ElementsAre(expected_version3, expected_version1));
// Regression test for https://crbug.com/1044952.
EXPECT_THAT(ParseQuicVersions("QUIC_VERSION_50, QUIC_VERSION_50"),
ElementsAre(expected_version1));
EXPECT_THAT(ParseQuicVersions("h3-Q050, h3-Q050"),
ElementsAre(expected_version1));
EXPECT_THAT(ParseQuicVersions("h3-T050, h3-T050"),
ElementsAre(expected_version2));
EXPECT_THAT(ParseQuicVersions("h3-Q050, QUIC_VERSION_50"),
ElementsAre(expected_version1));
EXPECT_THAT(
ParseQuicVersions("QUIC_VERSION_50, h3-Q050, QUIC_VERSION_50, h3-Q050"),
ElementsAre(expected_version1));
EXPECT_THAT(ParseQuicVersions("QUIC_VERSION_50, h3-T050, h3-Q050"),
ElementsAre(expected_version1, expected_version2));
}
} // namespace } // namespace
} // namespace test } // namespace test
} // namespace net } // namespace net
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