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

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

Issue 13845012: [SPDY] Add flag and about:flags entry for SPDY/4 alpha 1 (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address comments Created 7 years, 8 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 | Annotate | Revision Log
« no previous file with comments | « net/socket/next_proto.h ('k') | net/spdy/spdy_framer.cc » ('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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/ssl_client_socket.h" 5 #include "net/socket/ssl_client_socket.h"
6 6
7 #include "base/string_util.h" 7 #include "base/string_util.h"
8 8
9 namespace net { 9 namespace net {
10 10
(...skipping 10 matching lines...) Expand all
21 if (proto_string == "http1.1" || proto_string == "http/1.1") { 21 if (proto_string == "http1.1" || proto_string == "http/1.1") {
22 return kProtoHTTP11; 22 return kProtoHTTP11;
23 } else if (proto_string == "spdy/1") { 23 } else if (proto_string == "spdy/1") {
24 return kProtoSPDY1; 24 return kProtoSPDY1;
25 } else if (proto_string == "spdy/2") { 25 } else if (proto_string == "spdy/2") {
26 return kProtoSPDY2; 26 return kProtoSPDY2;
27 } else if (proto_string == "spdy/3") { 27 } else if (proto_string == "spdy/3") {
28 return kProtoSPDY3; 28 return kProtoSPDY3;
29 } else if (proto_string == "spdy/3.1") { 29 } else if (proto_string == "spdy/3.1") {
30 return kProtoSPDY31; 30 return kProtoSPDY31;
31 } else if (proto_string == "spdy/4a1") {
32 return kProtoSPDY4a1;
31 } else { 33 } else {
32 return kProtoUnknown; 34 return kProtoUnknown;
33 } 35 }
34 } 36 }
35 37
36 // static 38 // static
37 const char* SSLClientSocket::NextProtoToString(NextProto next_proto) { 39 const char* SSLClientSocket::NextProtoToString(NextProto next_proto) {
38 switch (next_proto) { 40 switch (next_proto) {
39 case kProtoHTTP11: 41 case kProtoHTTP11:
40 return "http/1.1"; 42 return "http/1.1";
41 case kProtoSPDY1: 43 case kProtoSPDY1:
42 return "spdy/1"; 44 return "spdy/1";
43 case kProtoSPDY2: 45 case kProtoSPDY2:
44 return "spdy/2"; 46 return "spdy/2";
45 case kProtoSPDY3: 47 case kProtoSPDY3:
46 return "spdy/3"; 48 return "spdy/3";
47 case kProtoSPDY31: 49 case kProtoSPDY31:
48 return "spdy/3.1"; 50 return "spdy/3.1";
51 case kProtoSPDY4a1:
52 return "spdy/4a1";
49 default: 53 default:
50 break; 54 break;
51 } 55 }
52 return "unknown"; 56 return "unknown";
53 } 57 }
54 58
55 // static 59 // static
56 const char* SSLClientSocket::NextProtoStatusToString( 60 const char* SSLClientSocket::NextProtoStatusToString(
57 const SSLClientSocket::NextProtoStatus status) { 61 const SSLClientSocket::NextProtoStatus status) {
58 switch (status) { 62 switch (status) {
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
126 130
127 bool SSLClientSocket::WasChannelIDSent() const { 131 bool SSLClientSocket::WasChannelIDSent() const {
128 return channel_id_sent_; 132 return channel_id_sent_;
129 } 133 }
130 134
131 void SSLClientSocket::set_channel_id_sent(bool channel_id_sent) { 135 void SSLClientSocket::set_channel_id_sent(bool channel_id_sent) {
132 channel_id_sent_ = channel_id_sent; 136 channel_id_sent_ = channel_id_sent;
133 } 137 }
134 138
135 } // namespace net 139 } // namespace net
OLDNEW
« no previous file with comments | « net/socket/next_proto.h ('k') | net/spdy/spdy_framer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698