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

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

Issue 2515783003: Deprecate FLAGS_quic_enable_version_35. (Closed)
Patch Set: Created 4 years, 1 month 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_protocol_test.cc ('k') | no next file » | 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 "base/memory/ptr_util.h" 7 #include "base/memory/ptr_util.h"
8 #include "base/strings/string_number_conversions.h" 8 #include "base/strings/string_number_conversions.h"
9 #include "net/quic/core/quic_flags.h" 9 #include "net/quic/core/quic_flags.h"
10 #include "net/quic/core/quic_tag.h" 10 #include "net/quic/core/quic_tag.h"
(...skipping 17 matching lines...) Expand all
28 } 28 }
29 29
30 QuicVersionVector CurrentSupportedVersions() { 30 QuicVersionVector CurrentSupportedVersions() {
31 return FilterSupportedVersions(AllSupportedVersions()); 31 return FilterSupportedVersions(AllSupportedVersions());
32 } 32 }
33 33
34 QuicVersionVector FilterSupportedVersions(QuicVersionVector versions) { 34 QuicVersionVector FilterSupportedVersions(QuicVersionVector versions) {
35 QuicVersionVector filtered_versions(versions.size()); 35 QuicVersionVector filtered_versions(versions.size());
36 filtered_versions.clear(); // Guaranteed by spec not to change capacity. 36 filtered_versions.clear(); // Guaranteed by spec not to change capacity.
37 for (QuicVersion version : versions) { 37 for (QuicVersion version : versions) {
38 if (version == QUIC_VERSION_35) { 38 if (version == QUIC_VERSION_36) {
39 if (FLAGS_quic_enable_version_35) { 39 if (FLAGS_quic_enable_version_36_v2) {
40 filtered_versions.push_back(version);
41 }
42 } else if (version == QUIC_VERSION_36) {
43 if (FLAGS_quic_enable_version_35 && FLAGS_quic_enable_version_36_v2) {
44 filtered_versions.push_back(version); 40 filtered_versions.push_back(version);
45 } 41 }
46 } else { 42 } else {
47 filtered_versions.push_back(version); 43 filtered_versions.push_back(version);
48 } 44 }
49 } 45 }
50 return filtered_versions; 46 return filtered_versions;
51 } 47 }
52 48
53 QuicVersionVector VersionOfIndex(const QuicVersionVector& versions, int index) { 49 QuicVersionVector VersionOfIndex(const QuicVersionVector& versions, int index) {
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
107 for (size_t i = 0; i < versions.size(); ++i) { 103 for (size_t i = 0; i < versions.size(); ++i) {
108 if (i != 0) { 104 if (i != 0) {
109 result.append(","); 105 result.append(",");
110 } 106 }
111 result.append(QuicVersionToString(versions[i])); 107 result.append(QuicVersionToString(versions[i]));
112 } 108 }
113 return result; 109 return result;
114 } 110 }
115 111
116 } // namespace net 112 } // namespace net
OLDNEW
« no previous file with comments | « net/quic/core/quic_protocol_test.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698