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

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

Issue 941743002: Add a dedicated SSL protocol version metric. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Carve some corners into the round hole so the square peg fits better Created 5 years, 10 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
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 // OpenSSL binding for SSLClientSocket. The class layout and general principle 5 // OpenSSL binding for SSLClientSocket. The class layout and general principle
6 // of operation is derived from SSLClientSocketNSS. 6 // of operation is derived from SSLClientSocketNSS.
7 7
8 #include "net/socket/ssl_client_socket_openssl.h" 8 #include "net/socket/ssl_client_socket_openssl.h"
9 9
10 #include <errno.h> 10 #include <errno.h>
(...skipping 1193 matching lines...) Expand 10 before | Expand all | Expand 10 after
1204 base::TimeDelta verify_time = 1204 base::TimeDelta verify_time =
1205 base::TimeTicks::Now() - start_cert_verification_time_; 1205 base::TimeTicks::Now() - start_cert_verification_time_;
1206 if (result == OK) { 1206 if (result == OK) {
1207 UMA_HISTOGRAM_TIMES("Net.SSLCertVerificationTime", verify_time); 1207 UMA_HISTOGRAM_TIMES("Net.SSLCertVerificationTime", verify_time);
1208 } else { 1208 } else {
1209 UMA_HISTOGRAM_TIMES("Net.SSLCertVerificationTimeError", verify_time); 1209 UMA_HISTOGRAM_TIMES("Net.SSLCertVerificationTimeError", verify_time);
1210 } 1210 }
1211 } 1211 }
1212 1212
1213 if (result == OK) { 1213 if (result == OK) {
1214 RecordConnectionTypeMetrics(GetNetSSLVersion(ssl_));
1215
1216 if (SSL_session_reused(ssl_)) { 1214 if (SSL_session_reused(ssl_)) {
1217 // Record whether or not the server tried to resume a session for a 1215 // Record whether or not the server tried to resume a session for a
1218 // different version. See https://crbug.com/441456. 1216 // different version. See https://crbug.com/441456.
1219 UMA_HISTOGRAM_BOOLEAN( 1217 UMA_HISTOGRAM_BOOLEAN(
1220 "Net.SSLSessionVersionMatch", 1218 "Net.SSLSessionVersionMatch",
1221 SSL_version(ssl_) == SSL_get_session(ssl_)->ssl_version); 1219 SSL_version(ssl_) == SSL_get_session(ssl_)->ssl_version);
1222 } 1220 }
1223 } 1221 }
1224 1222
1225 const CertStatus cert_status = server_cert_verify_result_.cert_status; 1223 const CertStatus cert_status = server_cert_verify_result_.cert_status;
(...skipping 800 matching lines...) Expand 10 before | Expand all | Expand 10 after
2026 ct::SCT_STATUS_LOG_UNKNOWN)); 2024 ct::SCT_STATUS_LOG_UNKNOWN));
2027 } 2025 }
2028 } 2026 }
2029 2027
2030 scoped_refptr<X509Certificate> 2028 scoped_refptr<X509Certificate>
2031 SSLClientSocketOpenSSL::GetUnverifiedServerCertificateChain() const { 2029 SSLClientSocketOpenSSL::GetUnverifiedServerCertificateChain() const {
2032 return server_cert_; 2030 return server_cert_;
2033 } 2031 }
2034 2032
2035 } // namespace net 2033 } // namespace net
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698