Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 <algorithm> | 10 #include <algorithm> |
| (...skipping 1979 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1990 tb_was_negotiated_ = true; | 1990 tb_was_negotiated_ = true; |
| 1991 return 1; | 1991 return 1; |
| 1992 } | 1992 } |
| 1993 } | 1993 } |
| 1994 | 1994 |
| 1995 *out_alert_value = SSL_AD_ILLEGAL_PARAMETER; | 1995 *out_alert_value = SSL_AD_ILLEGAL_PARAMETER; |
| 1996 return 0; | 1996 return 0; |
| 1997 } | 1997 } |
| 1998 | 1998 |
| 1999 void SSLClientSocketImpl::LogConnectEndEvent(int rv) { | 1999 void SSLClientSocketImpl::LogConnectEndEvent(int rv) { |
| 2000 SSLContext::GetInstance()->session_cache()->DecrementLookupCount( | |
| 2001 GetSessionCacheKey(), negotiated_protocol_ == kProtoHTTP2); | |
|
davidben
2017/01/17 20:16:42
Doing it in LogConnectEndEvent seems wrong. If Ini
nharper
2017/01/17 20:33:16
The lookup happens in Init(), and it can return ER
davidben
2017/01/17 21:27:02
Oh, I see. You're tracking active lookups. But if
| |
| 2000 if (rv != OK) { | 2002 if (rv != OK) { |
| 2001 net_log_.EndEventWithNetErrorCode(NetLogEventType::SSL_CONNECT, rv); | 2003 net_log_.EndEventWithNetErrorCode(NetLogEventType::SSL_CONNECT, rv); |
| 2002 return; | 2004 return; |
| 2003 } | 2005 } |
| 2004 | 2006 |
| 2005 net_log_.EndEvent(NetLogEventType::SSL_CONNECT, | 2007 net_log_.EndEvent(NetLogEventType::SSL_CONNECT, |
| 2006 base::Bind(&NetLogSSLInfoCallback, base::Unretained(this))); | 2008 base::Bind(&NetLogSSLInfoCallback, base::Unretained(this))); |
| 2007 } | 2009 } |
| 2008 | 2010 |
| 2009 void SSLClientSocketImpl::RecordNegotiatedProtocol() const { | 2011 void SSLClientSocketImpl::RecordNegotiatedProtocol() const { |
| (...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2065 if (ERR_GET_REASON(info->error_code) == SSL_R_TLSV1_ALERT_ACCESS_DENIED && | 2067 if (ERR_GET_REASON(info->error_code) == SSL_R_TLSV1_ALERT_ACCESS_DENIED && |
| 2066 !certificate_requested_) { | 2068 !certificate_requested_) { |
| 2067 net_error = ERR_SSL_PROTOCOL_ERROR; | 2069 net_error = ERR_SSL_PROTOCOL_ERROR; |
| 2068 } | 2070 } |
| 2069 } | 2071 } |
| 2070 | 2072 |
| 2071 return net_error; | 2073 return net_error; |
| 2072 } | 2074 } |
| 2073 | 2075 |
| 2074 } // namespace net | 2076 } // namespace net |
| OLD | NEW |