Implement HasPermission() method in PermissionService.
[chromium-blink-merge.git] / net / socket / next_proto.cc
blob0e59ce7fdc132fffc30487161b654f8ca1fc7edf
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 "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 return next_protos;
22 NextProtoVector NextProtosWithSpdyAndQuic(bool spdy_enabled,
23 bool quic_enabled) {
24 NextProtoVector next_protos;
25 next_protos.push_back(kProtoHTTP11);
26 if (quic_enabled)
27 next_protos.push_back(kProtoQUIC1SPDY3);
28 if (spdy_enabled) {
29 next_protos.push_back(kProtoSPDY31);
31 return next_protos;
34 NextProtoVector NextProtosSpdy31() {
35 NextProtoVector next_protos;
36 next_protos.push_back(kProtoHTTP11);
37 next_protos.push_back(kProtoQUIC1SPDY3);
38 next_protos.push_back(kProtoSPDY31);
39 return next_protos;
42 NextProtoVector NextProtosSpdy4Http2() {
43 NextProtoVector next_protos;
44 next_protos.push_back(kProtoHTTP11);
45 next_protos.push_back(kProtoQUIC1SPDY3);
46 next_protos.push_back(kProtoSPDY31);
47 next_protos.push_back(kProtoSPDY4_14);
48 next_protos.push_back(kProtoSPDY4_15);
49 return next_protos;
52 } // namespace net