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

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

Issue 2496953002: Revert of Unify enum NextProto and enum AlternateProtocol. (Closed)
Patch Set: Created 4 years, 1 month 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/ssl_client_socket_impl.h ('k') | net/spdy/spdy_http_stream.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 (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_impl.h" 5 #include "net/socket/ssl_client_socket_impl.h"
6 6
7 #include <errno.h> 7 #include <errno.h>
8 #include <string.h> 8 #include <string.h>
9 9
10 #include <utility> 10 #include <utility>
(...skipping 176 matching lines...) Expand 10 before | Expand all | Expand 10 after
187 std::unique_ptr<base::DictionaryValue> dict(new base::DictionaryValue()); 187 std::unique_ptr<base::DictionaryValue> dict(new base::DictionaryValue());
188 const char* version_str; 188 const char* version_str;
189 SSLVersionToString(&version_str, 189 SSLVersionToString(&version_str,
190 SSLConnectionStatusToVersion(ssl_info.connection_status)); 190 SSLConnectionStatusToVersion(ssl_info.connection_status));
191 dict->SetString("version", version_str); 191 dict->SetString("version", version_str);
192 dict->SetBoolean("is_resumed", 192 dict->SetBoolean("is_resumed",
193 ssl_info.handshake_type == SSLInfo::HANDSHAKE_RESUME); 193 ssl_info.handshake_type == SSLInfo::HANDSHAKE_RESUME);
194 dict->SetInteger("cipher_suite", SSLConnectionStatusToCipherSuite( 194 dict->SetInteger("cipher_suite", SSLConnectionStatusToCipherSuite(
195 ssl_info.connection_status)); 195 ssl_info.connection_status));
196 196
197 dict->SetString("next_proto", 197 dict->SetString("next_proto", SSLClientSocket::NextProtoToString(
198 NextProtoToString(socket->GetNegotiatedProtocol())); 198 socket->GetNegotiatedProtocol()));
199 199
200 return std::move(dict); 200 return std::move(dict);
201 } 201 }
202 202
203 int GetBufferSize(const char* field_trial) { 203 int GetBufferSize(const char* field_trial) {
204 // Get buffer sizes from field trials, if possible. If values not present, 204 // Get buffer sizes from field trials, if possible. If values not present,
205 // use default. Also make sure values are in reasonable range. 205 // use default. Also make sure values are in reasonable range.
206 int buffer_size = kDefaultOpenSSLBufferSize; 206 int buffer_size = kDefaultOpenSSLBufferSize;
207 #if !defined(OS_NACL) 207 #if !defined(OS_NACL)
208 int override_buffer_size; 208 int override_buffer_size;
(...skipping 1789 matching lines...) Expand 10 before | Expand all | Expand 10 after
1998 if (ERR_GET_REASON(info->error_code) == SSL_R_TLSV1_ALERT_ACCESS_DENIED && 1998 if (ERR_GET_REASON(info->error_code) == SSL_R_TLSV1_ALERT_ACCESS_DENIED &&
1999 !certificate_requested_) { 1999 !certificate_requested_) {
2000 net_error = ERR_SSL_PROTOCOL_ERROR; 2000 net_error = ERR_SSL_PROTOCOL_ERROR;
2001 } 2001 }
2002 } 2002 }
2003 2003
2004 return net_error; 2004 return net_error;
2005 } 2005 }
2006 2006
2007 } // namespace net 2007 } // namespace net
OLDNEW
« no previous file with comments | « net/socket/ssl_client_socket_impl.h ('k') | net/spdy/spdy_http_stream.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698