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

Side by Side Diff: net/quic/quic_protocol.cc

Issue 2100863003: Disable QUIC v29 and earlier. Protected by FLAGS_quic_disable_pre_30. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@home
Patch Set: Fixing compile error on android. Created 4 years, 5 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 unified diff | Download patch
« no previous file with comments | « net/quic/quic_protocol.h ('k') | net/quic/quic_protocol_test.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "net/quic/quic_protocol.h" 5 #include "net/quic/quic_protocol.h"
6 6
7 #include "base/stl_util.h" 7 #include "base/stl_util.h"
8 #include "base/strings/string_number_conversions.h" 8 #include "base/strings/string_number_conversions.h"
9 #include "net/quic/quic_flags.h" 9 #include "net/quic/quic_flags.h"
10 #include "net/quic/quic_utils.h" 10 #include "net/quic/quic_utils.h"
(...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after
172 } 172 }
173 173
174 QuicVersionVector QuicSupportedVersions() { 174 QuicVersionVector QuicSupportedVersions() {
175 QuicVersionVector supported_versions; 175 QuicVersionVector supported_versions;
176 for (size_t i = 0; i < arraysize(kSupportedQuicVersions); ++i) { 176 for (size_t i = 0; i < arraysize(kSupportedQuicVersions); ++i) {
177 supported_versions.push_back(kSupportedQuicVersions[i]); 177 supported_versions.push_back(kSupportedQuicVersions[i]);
178 } 178 }
179 return supported_versions; 179 return supported_versions;
180 } 180 }
181 181
182 QuicVersionVector FilterSupportedVersions(QuicVersionVector versions) {
183 QuicVersionVector filtered_versions(versions.size());
184 filtered_versions.clear(); // Guaranteed by spec not to change capacity.
185 for (QuicVersion version : versions) {
186 if (!FLAGS_quic_disable_pre_30 || version >= QUIC_VERSION_30) {
187 filtered_versions.push_back(version);
188 }
189 }
190 return filtered_versions;
191 }
192
182 QuicTag QuicVersionToQuicTag(const QuicVersion version) { 193 QuicTag QuicVersionToQuicTag(const QuicVersion version) {
183 switch (version) { 194 switch (version) {
184 case QUIC_VERSION_25: 195 case QUIC_VERSION_25:
185 return MakeQuicTag('Q', '0', '2', '5'); 196 return MakeQuicTag('Q', '0', '2', '5');
186 case QUIC_VERSION_26: 197 case QUIC_VERSION_26:
187 return MakeQuicTag('Q', '0', '2', '6'); 198 return MakeQuicTag('Q', '0', '2', '6');
188 case QUIC_VERSION_27: 199 case QUIC_VERSION_27:
189 return MakeQuicTag('Q', '0', '2', '7'); 200 return MakeQuicTag('Q', '0', '2', '7');
190 case QUIC_VERSION_28: 201 case QUIC_VERSION_28:
191 return MakeQuicTag('Q', '0', '2', '8'); 202 return MakeQuicTag('Q', '0', '2', '8');
(...skipping 656 matching lines...) Expand 10 before | Expand all | Expand 10 after
848 is_unackable(false), 859 is_unackable(false),
849 has_crypto_handshake(has_crypto_handshake), 860 has_crypto_handshake(has_crypto_handshake),
850 num_padding_bytes(num_padding_bytes), 861 num_padding_bytes(num_padding_bytes),
851 retransmission(0) {} 862 retransmission(0) {}
852 863
853 TransmissionInfo::TransmissionInfo(const TransmissionInfo& other) = default; 864 TransmissionInfo::TransmissionInfo(const TransmissionInfo& other) = default;
854 865
855 TransmissionInfo::~TransmissionInfo() {} 866 TransmissionInfo::~TransmissionInfo() {}
856 867
857 } // namespace net 868 } // namespace net
OLDNEW
« no previous file with comments | « net/quic/quic_protocol.h ('k') | net/quic/quic_protocol_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698