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"
9 NextProtoVector
NextProtosDefaults() {
10 NextProtoVector next_protos
;
11 next_protos
.push_back(kProtoHTTP11
);
12 next_protos
.push_back(kProtoSPDY31
);
13 next_protos
.push_back(kProtoHTTP2
);
17 NextProtoVector
NextProtosWithSpdyAndQuic(bool spdy_enabled
,
19 NextProtoVector next_protos
;
20 next_protos
.push_back(kProtoHTTP11
);
22 next_protos
.push_back(kProtoQUIC1SPDY3
);
24 next_protos
.push_back(kProtoSPDY31
);
25 next_protos
.push_back(kProtoHTTP2
);
30 NextProtoVector
NextProtosSpdy31() {
31 NextProtoVector next_protos
;
32 next_protos
.push_back(kProtoHTTP11
);
33 next_protos
.push_back(kProtoQUIC1SPDY3
);
34 next_protos
.push_back(kProtoSPDY31
);
38 bool NextProtoIsSPDY(NextProto next_proto
) {
39 return next_proto
>= kProtoSPDYMinimumVersion
&&
40 next_proto
<= kProtoSPDYMaximumVersion
;