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

Unified Diff: net/quic/quic_protocol.cc

Issue 2104633002: Landing recent QUIC changes until 6/24/2016 14:00 UTC (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 4 years, 6 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/quic_protocol.h ('k') | net/quic/quic_sent_packet_manager.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/quic/quic_protocol.cc
diff --git a/net/quic/quic_protocol.cc b/net/quic/quic_protocol.cc
index e53db9cc00d7018e3b7cfdb50609ae976f91a2b3..41ef5c7bf7efba72d925f10284ce1bf7a6c16f7d 100644
--- a/net/quic/quic_protocol.cc
+++ b/net/quic/quic_protocol.cc
@@ -183,8 +183,18 @@ QuicVersionVector FilterSupportedVersions(QuicVersionVector versions) {
QuicVersionVector filtered_versions(versions.size());
filtered_versions.clear(); // Guaranteed by spec not to change capacity.
for (QuicVersion version : versions) {
- if (!FLAGS_quic_disable_pre_30 || version >= QUIC_VERSION_30) {
- filtered_versions.push_back(version);
+ if (version < QUIC_VERSION_30) {
+ if (!FLAGS_quic_disable_pre_30) {
+ filtered_versions.push_back(version);
+ }
+ } else {
+ if (version == QUIC_VERSION_35) {
+ if (FLAGS_quic_enable_version_35) {
+ filtered_versions.push_back(version);
+ }
+ } else {
+ filtered_versions.push_back(version);
+ }
}
}
return filtered_versions;
@@ -212,6 +222,8 @@ QuicTag QuicVersionToQuicTag(const QuicVersion version) {
return MakeQuicTag('Q', '0', '3', '3');
case QUIC_VERSION_34:
return MakeQuicTag('Q', '0', '3', '4');
+ case QUIC_VERSION_35:
+ return MakeQuicTag('Q', '0', '3', '5');
default:
// This shold be an ERROR because we should never attempt to convert an
// invalid QuicVersion to be written to the wire.
@@ -248,6 +260,7 @@ string QuicVersionToString(const QuicVersion version) {
RETURN_STRING_LITERAL(QUIC_VERSION_32);
RETURN_STRING_LITERAL(QUIC_VERSION_33);
RETURN_STRING_LITERAL(QUIC_VERSION_34);
+ RETURN_STRING_LITERAL(QUIC_VERSION_35);
default:
return "QUIC_VERSION_UNSUPPORTED";
}
« no previous file with comments | « net/quic/quic_protocol.h ('k') | net/quic/quic_sent_packet_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698