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

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

Issue 2241183004: Landing Recent QUIC changes until Sat Aug 13 04:32:36 2016 UTC-0 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix compiler error. Created 4 years, 4 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_protocol.h ('k') | net/quic/core/quic_protocol_test.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/quic/core/quic_protocol.cc
diff --git a/net/quic/core/quic_protocol.cc b/net/quic/core/quic_protocol.cc
index 586e3160a18600880b41e4b2649b1adfc9603616..d0e67154b096f31006ab14a4d1b0931b4f722085 100644
--- a/net/quic/core/quic_protocol.cc
+++ b/net/quic/core/quic_protocol.cc
@@ -187,7 +187,11 @@ QuicVersionVector FilterSupportedVersions(QuicVersionVector versions) {
QuicVersionVector filtered_versions(versions.size());
filtered_versions.clear(); // Guaranteed by spec not to change capacity.
for (QuicVersion version : versions) {
- if (version == QUIC_VERSION_35) {
+ if (version < QUIC_VERSION_32) {
+ if (!FLAGS_quic_disable_pre_32) {
+ filtered_versions.push_back(version);
+ }
+ } else if (version == QUIC_VERSION_35) {
if (FLAGS_quic_enable_version_35) {
filtered_versions.push_back(version);
}
@@ -849,25 +853,28 @@ StringPiece QuicPacket::Plaintext(QuicVersion version) const {
}
QuicVersionManager::QuicVersionManager(QuicVersionVector supported_versions)
- : enable_quic_version_35_(FLAGS_quic_enable_version_35),
- enable_quic_version_36_(FLAGS_quic_enable_version_36_v2),
+ : disable_pre_32_(FLAGS_quic_disable_pre_32),
+ enable_version_35_(FLAGS_quic_enable_version_35),
+ enable_version_36_(FLAGS_quic_enable_version_36_v2),
allowed_supported_versions_(supported_versions),
filtered_supported_versions_(
FilterSupportedVersions(supported_versions)) {}
+QuicVersionManager::~QuicVersionManager() {}
+
const QuicVersionVector& QuicVersionManager::GetSupportedVersions() {
- if (enable_quic_version_35_ != FLAGS_quic_enable_version_35 ||
- enable_quic_version_36_ != FLAGS_quic_enable_version_36_v2) {
- enable_quic_version_35_ = FLAGS_quic_enable_version_35;
- enable_quic_version_36_ = FLAGS_quic_enable_version_36_v2;
+ if (disable_pre_32_ != FLAGS_quic_disable_pre_32 ||
+ 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;
+ enable_version_35_ = FLAGS_quic_enable_version_35;
+ enable_version_36_ = FLAGS_quic_enable_version_36_v2;
filtered_supported_versions_ =
FilterSupportedVersions(allowed_supported_versions_);
}
return filtered_supported_versions_;
}
-QuicVersionManager::~QuicVersionManager() {}
-
AckListenerWrapper::AckListenerWrapper(QuicAckListenerInterface* listener,
QuicPacketLength data_length)
: ack_listener(listener), length(data_length) {
« no previous file with comments | « net/quic/core/quic_protocol.h ('k') | net/quic/core/quic_protocol_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698