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

Side by Side Diff: net/socket/next_proto.cc

Issue 812543002: Update from https://crrev.com/308331 (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 years 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/socket/client_socket_pool_base.cc ('k') | net/socket/ssl_client_socket.h » ('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 2014 The Chromium Authors. All rights reserved. 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 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 #include "next_proto.h" 5 #include "net/socket/next_proto.h"
6 6
7 namespace net { 7 namespace net {
8 8
9 NextProtoVector NextProtosHttpOnly() { 9 NextProtoVector NextProtosHttpOnly() {
10 NextProtoVector next_protos; 10 NextProtoVector next_protos;
11 next_protos.push_back(kProtoHTTP11); 11 next_protos.push_back(kProtoHTTP11);
12 return next_protos; 12 return next_protos;
13 } 13 }
14 14
15 NextProtoVector NextProtosDefaults() { 15 NextProtoVector NextProtosDefaults() {
16 NextProtoVector next_protos; 16 NextProtoVector next_protos;
17 next_protos.push_back(kProtoHTTP11); 17 next_protos.push_back(kProtoHTTP11);
18 next_protos.push_back(kProtoSPDY31); 18 next_protos.push_back(kProtoSPDY31);
19 next_protos.push_back(kProtoSPDY4_14);
20 next_protos.push_back(kProtoSPDY4_15);
19 return next_protos; 21 return next_protos;
20 } 22 }
21 23
22 NextProtoVector NextProtosWithSpdyAndQuic(bool spdy_enabled, 24 NextProtoVector NextProtosWithSpdyAndQuic(bool spdy_enabled,
23 bool quic_enabled) { 25 bool quic_enabled) {
24 NextProtoVector next_protos; 26 NextProtoVector next_protos;
25 next_protos.push_back(kProtoHTTP11); 27 next_protos.push_back(kProtoHTTP11);
26 if (quic_enabled) 28 if (quic_enabled)
27 next_protos.push_back(kProtoQUIC1SPDY3); 29 next_protos.push_back(kProtoQUIC1SPDY3);
28 if (spdy_enabled) { 30 if (spdy_enabled) {
29 next_protos.push_back(kProtoSPDY31); 31 next_protos.push_back(kProtoSPDY31);
32 next_protos.push_back(kProtoSPDY4_14);
33 next_protos.push_back(kProtoSPDY4_15);
30 } 34 }
31 return next_protos; 35 return next_protos;
32 } 36 }
33 37
34 NextProtoVector NextProtosSpdy31() { 38 NextProtoVector NextProtosSpdy31() {
35 NextProtoVector next_protos; 39 NextProtoVector next_protos;
36 next_protos.push_back(kProtoHTTP11); 40 next_protos.push_back(kProtoHTTP11);
37 next_protos.push_back(kProtoQUIC1SPDY3); 41 next_protos.push_back(kProtoQUIC1SPDY3);
38 next_protos.push_back(kProtoSPDY31); 42 next_protos.push_back(kProtoSPDY31);
39 return next_protos; 43 return next_protos;
40 } 44 }
41 45
42 NextProtoVector NextProtosSpdy4Http2() { 46 NextProtoVector NextProtosSpdy4Http2() {
43 NextProtoVector next_protos; 47 NextProtoVector next_protos;
44 next_protos.push_back(kProtoHTTP11); 48 next_protos.push_back(kProtoHTTP11);
45 next_protos.push_back(kProtoQUIC1SPDY3); 49 next_protos.push_back(kProtoQUIC1SPDY3);
46 next_protos.push_back(kProtoSPDY31); 50 next_protos.push_back(kProtoSPDY31);
47 next_protos.push_back(kProtoSPDY4_14); 51 next_protos.push_back(kProtoSPDY4_14);
48 next_protos.push_back(kProtoSPDY4_15); 52 next_protos.push_back(kProtoSPDY4_15);
49 return next_protos; 53 return next_protos;
50 } 54 }
51 55
52 } // namespace net 56 } // namespace net
OLDNEW
« no previous file with comments | « net/socket/client_socket_pool_base.cc ('k') | net/socket/ssl_client_socket.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698