OLD | NEW |
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_SOCKET_NEXT_PROTO_H_ | 5 #ifndef NET_SOCKET_NEXT_PROTO_H_ |
6 #define NET_SOCKET_NEXT_PROTO_H_ | 6 #define NET_SOCKET_NEXT_PROTO_H_ |
7 | 7 |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "net/base/net_export.h" | 10 #include "net/base/net_export.h" |
11 | 11 |
12 namespace net { | 12 namespace net { |
13 | 13 |
14 // Next Protocol Negotiation (NPN), if successful, results in agreement on an | 14 // Next Protocol Negotiation (NPN), if successful, results in agreement on an |
15 // application-level string that specifies the application level protocol to | 15 // application-level string that specifies the application level protocol to |
16 // use over the TLS connection. NextProto enumerates the application level | 16 // use over the TLS connection. NextProto enumerates the application level |
17 // protocols that we recognize. Do not change or reuse values, because they | 17 // protocols that we recognize. Do not change or reuse values, because they |
18 // are used to collect statistics on UMA. Also, values must be in [0,499), | 18 // are used to collect statistics on UMA. Also, values must be in [0,499), |
19 // because of the way TLS protocol negotiation extension information is added to | 19 // because of the way TLS protocol negotiation extension information is added to |
20 // UMA histogram. | 20 // UMA histogram. |
21 enum NextProto { | 21 enum NextProto { |
22 kProtoUnknown = 0, | 22 kProtoUnknown = 0, |
23 kProtoHTTP11 = 1, | 23 kProtoHTTP11 = 1, |
24 kProtoMinimumVersion = kProtoHTTP11, | 24 kProtoMinimumVersion = kProtoHTTP11, |
25 | 25 |
26 kProtoDeprecatedSPDY2 = 100, | 26 kProtoDeprecatedSPDY2 = 100, |
27 kProtoSPDYMinimumVersion = kProtoDeprecatedSPDY2, | 27 kProtoSPDYMinimumVersion = kProtoDeprecatedSPDY2, |
28 kProtoSPDY3 = 101, | 28 kProtoSPDY3 = 101, |
29 kProtoSPDY31 = 102, | 29 kProtoSPDY31 = 102, |
30 kProtoSPDY4 = 103, // SPDY4 is HTTP/2. | 30 // HTTP/2 draft-14 was 103, |
| 31 kProtoSPDY4 = 104, // SPDY4 is HTTP/2 draft-15. |
31 kProtoSPDYMaximumVersion = kProtoSPDY4, | 32 kProtoSPDYMaximumVersion = kProtoSPDY4, |
32 | 33 |
33 kProtoQUIC1SPDY3 = 200, | 34 kProtoQUIC1SPDY3 = 200, |
34 | 35 |
35 kProtoMaximumVersion = kProtoQUIC1SPDY3, | 36 kProtoMaximumVersion = kProtoQUIC1SPDY3, |
36 }; | 37 }; |
37 | 38 |
38 // List of protocols to use for NPN, used for configuring HttpNetworkSessions. | 39 // List of protocols to use for NPN, used for configuring HttpNetworkSessions. |
39 typedef std::vector<NextProto> NextProtoVector; | 40 typedef std::vector<NextProto> NextProtoVector; |
40 | 41 |
(...skipping 10 matching lines...) Expand all Loading... |
51 | 52 |
52 // All of these also enable QUIC. | 53 // All of these also enable QUIC. |
53 NET_EXPORT NextProtoVector NextProtosSpdy3(); | 54 NET_EXPORT NextProtoVector NextProtosSpdy3(); |
54 NET_EXPORT NextProtoVector NextProtosSpdy31(); | 55 NET_EXPORT NextProtoVector NextProtosSpdy31(); |
55 NET_EXPORT NextProtoVector NextProtosSpdy31WithSpdy2(); | 56 NET_EXPORT NextProtoVector NextProtosSpdy31WithSpdy2(); |
56 NET_EXPORT NextProtoVector NextProtosSpdy4Http2(); | 57 NET_EXPORT NextProtoVector NextProtosSpdy4Http2(); |
57 | 58 |
58 } // namespace net | 59 } // namespace net |
59 | 60 |
60 #endif // NET_SOCKET_NEXT_PROTO_H_ | 61 #endif // NET_SOCKET_NEXT_PROTO_H_ |
OLD | NEW |