Add a histogram for session resumption version mismatches.
BUG=441456
Review URL: https://codereview.chromium.org/797693003
Cr-Commit-Position: refs/heads/master@{#308040}
diff --git a/net/socket/ssl_client_socket_openssl.cc b/net/socket/ssl_client_socket_openssl.cc
index 6433b23..5415755f 100644
--- a/net/socket/ssl_client_socket_openssl.cc
+++ b/net/socket/ssl_client_socket_openssl.cc
@@ -1131,9 +1131,18 @@
}
}
- if (result == OK)
+ if (result == OK) {
RecordConnectionTypeMetrics(GetNetSSLVersion(ssl_));
+ if (SSL_session_reused(ssl_)) {
+ // Record whether or not the server tried to resume a session for a
+ // different version. See https://crbug.com/441456.
+ UMA_HISTOGRAM_BOOLEAN(
+ "Net.SSLSessionVersionMatch",
+ SSL_version(ssl_) == SSL_get_session(ssl_)->ssl_version);
+ }
+ }
+
const CertStatus cert_status = server_cert_verify_result_.cert_status;
if (transport_security_state_ &&
(result == OK ||