Show Pages in chrome://md-settings
[chromium-blink-merge.git] / net / socket / next_proto.cc
blob6b5ee3e028f32077a9ac5795669807201b15375f
1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #include "net/socket/next_proto.h"
7 namespace net {
9 NextProtoVector NextProtosHttpOnly() {
10 NextProtoVector next_protos;
11 next_protos.push_back(kProtoHTTP11);
12 return next_protos;
15 NextProtoVector NextProtosDefaults() {
16 NextProtoVector next_protos;
17 next_protos.push_back(kProtoHTTP11);
18 next_protos.push_back(kProtoSPDY31);
19 next_protos.push_back(kProtoSPDY4_14);
20 next_protos.push_back(kProtoSPDY4);
21 return next_protos;
24 NextProtoVector NextProtosWithSpdyAndQuic(bool spdy_enabled,
25 bool quic_enabled) {
26 NextProtoVector next_protos;
27 next_protos.push_back(kProtoHTTP11);
28 if (quic_enabled)
29 next_protos.push_back(kProtoQUIC1SPDY3);
30 if (spdy_enabled) {
31 next_protos.push_back(kProtoSPDY31);
32 next_protos.push_back(kProtoSPDY4_14);
33 next_protos.push_back(kProtoSPDY4);
35 return next_protos;
38 NextProtoVector NextProtosSpdy31() {
39 NextProtoVector next_protos;
40 next_protos.push_back(kProtoHTTP11);
41 next_protos.push_back(kProtoQUIC1SPDY3);
42 next_protos.push_back(kProtoSPDY31);
43 return next_protos;
46 NextProtoVector NextProtosSpdy4Http2() {
47 NextProtoVector next_protos;
48 next_protos.push_back(kProtoHTTP11);
49 next_protos.push_back(kProtoQUIC1SPDY3);
50 next_protos.push_back(kProtoSPDY31);
51 next_protos.push_back(kProtoSPDY4_14);
52 next_protos.push_back(kProtoSPDY4);
53 return next_protos;
56 } // namespace net