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

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

Issue 2323933003: Disable QUIC versions 33 and earlier, protected by FLAGS_quic_disable_pre_34. (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
Index: net/quic/core/quic_protocol.cc
diff --git a/net/quic/core/quic_protocol.cc b/net/quic/core/quic_protocol.cc
index 14b73bf1a7abdf7b8b3ea002795815c10ed88ecf..a818b058eac8429f51af04ad1900fe0c7026d908 100644
--- a/net/quic/core/quic_protocol.cc
+++ b/net/quic/core/quic_protocol.cc
@@ -188,7 +188,12 @@ QuicVersionVector FilterSupportedVersions(QuicVersionVector versions) {
filtered_versions.clear(); // Guaranteed by spec not to change capacity.
for (QuicVersion version : versions) {
if (version < QUIC_VERSION_32) {
- if (!FLAGS_quic_disable_pre_32) {
+ if (!FLAGS_quic_disable_pre_32 &&
+ !FLAGS_quic_disable_pre_34) {
+ filtered_versions.push_back(version);
+ }
+ } else if (version < QUIC_VERSION_34) {
+ if (!FLAGS_quic_disable_pre_34) {
filtered_versions.push_back(version);
}
} else if (version == QUIC_VERSION_35) {
@@ -780,6 +785,7 @@ StringPiece QuicPacket::Plaintext(QuicVersion version) const {
QuicVersionManager::QuicVersionManager(QuicVersionVector supported_versions)
: disable_pre_32_(FLAGS_quic_disable_pre_32),
+ disable_pre_34_(FLAGS_quic_disable_pre_34),
enable_version_35_(FLAGS_quic_enable_version_35),
enable_version_36_(FLAGS_quic_enable_version_36_v2),
allowed_supported_versions_(supported_versions),
@@ -790,9 +796,11 @@ QuicVersionManager::~QuicVersionManager() {}
const QuicVersionVector& QuicVersionManager::GetSupportedVersions() {
if (disable_pre_32_ != FLAGS_quic_disable_pre_32 ||
+ disable_pre_34_ != FLAGS_quic_disable_pre_34 ||
enable_version_35_ != FLAGS_quic_enable_version_35 ||
enable_version_36_ != FLAGS_quic_enable_version_36_v2) {
disable_pre_32_ = FLAGS_quic_disable_pre_32;
+ disable_pre_34_ = FLAGS_quic_disable_pre_34;
enable_version_35_ = FLAGS_quic_enable_version_35;
enable_version_36_ = FLAGS_quic_enable_version_36_v2;
filtered_supported_versions_ =

Powered by Google App Engine
This is Rietveld 408576698