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

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

Issue 2825083003: Landing Recent QUIC changes until Mon Apr 17 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.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 #ifndef NET_QUIC_CORE_QUIC_VERSIONS_H_ 5 #ifndef NET_QUIC_CORE_QUIC_VERSIONS_H_
6 #define NET_QUIC_CORE_QUIC_VERSIONS_H_ 6 #define NET_QUIC_CORE_QUIC_VERSIONS_H_
7 7
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
11 #include "net/quic/core/quic_tag.h" 11 #include "net/quic/core/quic_tag.h"
12 #include "net/quic/core/quic_types.h" 12 #include "net/quic/core/quic_types.h"
13 #include "net/quic/platform/api/quic_export.h" 13 #include "net/quic/platform/api/quic_export.h"
14 14
15 namespace net { 15 namespace net {
16 16
17 // The available versions of QUIC. Guaranteed that the integer value of the enum 17 // The available versions of QUIC. Guaranteed that the integer value of the enum
18 // will match the version number. 18 // will match the version number.
19 // When adding a new version to this enum you should add it to 19 // When adding a new version to this enum you should add it to
20 // kSupportedQuicVersions (if appropriate), and also add a new case to the 20 // kSupportedQuicVersions (if appropriate), and also add a new case to the
21 // helper methods QuicVersionToQuicTag, QuicTagToQuicVersion, and 21 // helper methods QuicVersionToQuicTag, QuicTagToQuicVersion, and
22 // QuicVersionToString. 22 // QuicVersionToString.
23 enum QuicVersion { 23 enum QuicVersion {
24 // Special case to indicate unknown/unsupported QUIC version. 24 // Special case to indicate unknown/unsupported QUIC version.
25 QUIC_VERSION_UNSUPPORTED = 0, 25 QUIC_VERSION_UNSUPPORTED = 0,
26 26
27 QUIC_VERSION_34 = 34, // Deprecates entropy, removes private flag from packet
28 // header, uses new ack and stop waiting wire format.
29 QUIC_VERSION_35 = 35, // Allows endpoints to independently set stream limit. 27 QUIC_VERSION_35 = 35, // Allows endpoints to independently set stream limit.
30 QUIC_VERSION_36 = 36, // Add support to force HOL blocking. 28 QUIC_VERSION_36 = 36, // Add support to force HOL blocking.
31 QUIC_VERSION_37 = 37, // Add perspective into null encryption. 29 QUIC_VERSION_37 = 37, // Add perspective into null encryption.
32 QUIC_VERSION_38 = 38, // PADDING frame is a 1-byte frame with type 0x00. 30 QUIC_VERSION_38 = 38, // PADDING frame is a 1-byte frame with type 0x00.
33 // Respect NSTP connection option. 31 // Respect NSTP connection option.
34 QUIC_VERSION_39 = 39, // Experimental support for HTTP stream pairs 32 QUIC_VERSION_39 = 39, // Experimental support for HTTP stream pairs
35 // and HPACK HoL avoidance. 33 // and HPACK HoL avoidance.
36 34
37 // IMPORTANT: if you are adding to this list, follow the instructions at 35 // IMPORTANT: if you are adding to this list, follow the instructions at
38 // http://sites/quic/adding-and-removing-versions 36 // http://sites/quic/adding-and-removing-versions
39 }; 37 };
40 38
41 // This vector contains QUIC versions which we currently support. 39 // This vector contains QUIC versions which we currently support.
42 // This should be ordered such that the highest supported version is the first 40 // This should be ordered such that the highest supported version is the first
43 // element, with subsequent elements in descending order (versions can be 41 // element, with subsequent elements in descending order (versions can be
44 // skipped as necessary). 42 // skipped as necessary).
45 // 43 //
46 // IMPORTANT: if you are adding to this list, follow the instructions at 44 // IMPORTANT: if you are adding to this list, follow the instructions at
47 // http://sites/quic/adding-and-removing-versions 45 // http://sites/quic/adding-and-removing-versions
48 static const QuicVersion kSupportedQuicVersions[] = { 46 static const QuicVersion kSupportedQuicVersions[] = {
49 QUIC_VERSION_39, QUIC_VERSION_38, QUIC_VERSION_37, 47 QUIC_VERSION_39, QUIC_VERSION_38, QUIC_VERSION_37, QUIC_VERSION_36,
50 QUIC_VERSION_36, QUIC_VERSION_35, QUIC_VERSION_34}; 48 QUIC_VERSION_35};
51 49
52 typedef std::vector<QuicVersion> QuicVersionVector; 50 typedef std::vector<QuicVersion> QuicVersionVector;
53 51
54 // Returns a vector of QUIC versions in kSupportedQuicVersions. 52 // Returns a vector of QUIC versions in kSupportedQuicVersions.
55 QUIC_EXPORT_PRIVATE QuicVersionVector AllSupportedVersions(); 53 QUIC_EXPORT_PRIVATE QuicVersionVector AllSupportedVersions();
56 54
57 // Returns a vector of QUIC versions from kSupportedQuicVersions which exclude 55 // Returns a vector of QUIC versions from kSupportedQuicVersions which exclude
58 // any versions which are disabled by flags. 56 // any versions which are disabled by flags.
59 QUIC_EXPORT_PRIVATE QuicVersionVector CurrentSupportedVersions(); 57 QUIC_EXPORT_PRIVATE QuicVersionVector CurrentSupportedVersions();
60 58
(...skipping 22 matching lines...) Expand all
83 QUIC_EXPORT_PRIVATE std::string QuicVersionToString(const QuicVersion version); 81 QUIC_EXPORT_PRIVATE std::string QuicVersionToString(const QuicVersion version);
84 82
85 // Returns comma separated list of string representations of QuicVersion enum 83 // Returns comma separated list of string representations of QuicVersion enum
86 // values in the supplied |versions| vector. 84 // values in the supplied |versions| vector.
87 QUIC_EXPORT_PRIVATE std::string QuicVersionVectorToString( 85 QUIC_EXPORT_PRIVATE std::string QuicVersionVectorToString(
88 const QuicVersionVector& versions); 86 const QuicVersionVector& versions);
89 87
90 } // namespace net 88 } // namespace net
91 89
92 #endif // NET_QUIC_CORE_QUIC_VERSIONS_H_ 90 #endif // NET_QUIC_CORE_QUIC_VERSIONS_H_
OLDNEW
« no previous file with comments | « net/quic/core/quic_version_manager_test.cc ('k') | net/quic/core/quic_versions.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698