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

Side by Side Diff: net/quic/core/quic_versions.cc

Issue 2834723002: Landing Recent QUIC changes until Thu Apr 20 2017 (Closed)
Patch Set: Format Created 3 years, 8 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/core/quic_version_manager_test.cc ('k') | net/quic/core/quic_versions_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/core/quic_versions.h" 5 #include "net/quic/core/quic_versions.h"
6 6
7 #include "net/quic/core/quic_error_codes.h" 7 #include "net/quic/core/quic_error_codes.h"
8 #include "net/quic/core/quic_tag.h" 8 #include "net/quic/core/quic_tag.h"
9 #include "net/quic/core/quic_types.h" 9 #include "net/quic/core/quic_types.h"
10 #include "net/quic/platform/api/quic_flags.h" 10 #include "net/quic/platform/api/quic_flags.h"
(...skipping 13 matching lines...) Expand all
24 24
25 QuicVersionVector CurrentSupportedVersions() { 25 QuicVersionVector CurrentSupportedVersions() {
26 return FilterSupportedVersions(AllSupportedVersions()); 26 return FilterSupportedVersions(AllSupportedVersions());
27 } 27 }
28 28
29 QuicVersionVector FilterSupportedVersions(QuicVersionVector versions) { 29 QuicVersionVector FilterSupportedVersions(QuicVersionVector versions) {
30 QuicVersionVector filtered_versions(versions.size()); 30 QuicVersionVector filtered_versions(versions.size());
31 filtered_versions.clear(); // Guaranteed by spec not to change capacity. 31 filtered_versions.clear(); // Guaranteed by spec not to change capacity.
32 for (QuicVersion version : versions) { 32 for (QuicVersion version : versions) {
33 if (version == QUIC_VERSION_39) { 33 if (version == QUIC_VERSION_39) {
34 if (GetQuicFlag(FLAGS_quic_enable_version_39) && 34 if (FLAGS_quic_enable_version_39 &&
35 FLAGS_quic_reloadable_flag_quic_enable_version_38) { 35 FLAGS_quic_reloadable_flag_quic_enable_version_38) {
36 filtered_versions.push_back(version); 36 filtered_versions.push_back(version);
37 } 37 }
38 } else if (version == QUIC_VERSION_38) { 38 } else if (version == QUIC_VERSION_38) {
39 if (FLAGS_quic_reloadable_flag_quic_enable_version_38) { 39 if (FLAGS_quic_reloadable_flag_quic_enable_version_38) {
40 filtered_versions.push_back(version); 40 filtered_versions.push_back(version);
41 } 41 }
42 } else { 42 } else {
43 filtered_versions.push_back(version); 43 filtered_versions.push_back(version);
44 } 44 }
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
110 for (size_t i = 0; i < versions.size(); ++i) { 110 for (size_t i = 0; i < versions.size(); ++i) {
111 if (i != 0) { 111 if (i != 0) {
112 result.append(","); 112 result.append(",");
113 } 113 }
114 result.append(QuicVersionToString(versions[i])); 114 result.append(QuicVersionToString(versions[i]));
115 } 115 }
116 return result; 116 return result;
117 } 117 }
118 118
119 } // namespace net 119 } // namespace net
OLDNEW
« no previous file with comments | « net/quic/core/quic_version_manager_test.cc ('k') | net/quic/core/quic_versions_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698