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

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

Issue 1371263002: Refactor SSLClientSocket::SerializeNextProtos(). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Move DisableHTTP2 to next_protos. Created 5 years, 2 months 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/next_proto.h ('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 "net/socket/next_proto.h" 5 #include "net/socket/next_proto.h"
6 6
7 namespace net { 7 namespace net {
8 8
9 NextProtoVector NextProtosDefaults() { 9 NextProtoVector NextProtosDefaults() {
10 NextProtoVector next_protos; 10 NextProtoVector next_protos;
(...skipping 22 matching lines...) Expand all
33 next_protos.push_back(kProtoQUIC1SPDY3); 33 next_protos.push_back(kProtoQUIC1SPDY3);
34 next_protos.push_back(kProtoSPDY31); 34 next_protos.push_back(kProtoSPDY31);
35 return next_protos; 35 return next_protos;
36 } 36 }
37 37
38 bool NextProtoIsSPDY(NextProto next_proto) { 38 bool NextProtoIsSPDY(NextProto next_proto) {
39 return next_proto >= kProtoSPDYMinimumVersion && 39 return next_proto >= kProtoSPDYMinimumVersion &&
40 next_proto <= kProtoSPDYMaximumVersion; 40 next_proto <= kProtoSPDYMaximumVersion;
41 } 41 }
42 42
43 void DisableHTTP2(NextProtoVector* next_protos) {
44 for (NextProtoVector::iterator it = next_protos->begin();
45 it != next_protos->end();) {
46 if (*it == kProtoHTTP2) {
47 it = next_protos->erase(it);
48 continue;
49 }
50 ++it;
51 }
52 }
53
43 } // namespace net 54 } // namespace net
OLDNEW
« no previous file with comments | « net/socket/next_proto.h ('k') | net/socket/ssl_client_socket.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698