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

Unified Diff: net/socket/ssl_client_socket_impl.cc

Issue 2723883003: Fix Net.SSLSessionConcurrentLookupCount metric (Closed)
Patch Set: Created 3 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/socket/ssl_client_socket_impl.cc
diff --git a/net/socket/ssl_client_socket_impl.cc b/net/socket/ssl_client_socket_impl.cc
index 93153645d5a89c78a4996655ea1b22db83bed84d..a81e33144c130bfb91bda48394d5e98438dfce80 100644
--- a/net/socket/ssl_client_socket_impl.cc
+++ b/net/socket/ssl_client_socket_impl.cc
@@ -1149,17 +1149,6 @@ int SSLClientSocketImpl::DoHandshakeComplete(int result) {
SSLContext::GetInstance()->session_cache()->ResetLookupCount(
GetSessionCacheKey());
- // If we got a session from the session cache, log how many concurrent
- // handshakes that session was used in before we finished our handshake. This
- // is only recorded if the session from the cache was actually used, and only
- // if the ALPN protocol is h2 (under the assumption that TLS 1.3 servers will
- // be speaking h2). See https://crbug.com/631988.
- if (ssl_session_cache_lookup_count_ && negotiated_protocol_ == kProtoHTTP2 &&
- SSL_session_reused(ssl_.get())) {
- UMA_HISTOGRAM_EXACT_LINEAR("Net.SSLSessionConcurrentLookupCount",
- ssl_session_cache_lookup_count_, 20);
- }
-
// Check that if token binding was negotiated, then extended master secret
// and renegotiation indication must also be negotiated.
if (tb_was_negotiated_ &&
@@ -1177,6 +1166,17 @@ int SSLClientSocketImpl::DoHandshakeComplete(int result) {
negotiated_protocol_ = NextProtoFromString(proto);
}
+ // If we got a session from the session cache, log how many concurrent
+ // handshakes that session was used in before we finished our handshake. This
+ // is only recorded if the session from the cache was actually used, and only
+ // if the ALPN protocol is h2 (under the assumption that TLS 1.3 servers will
+ // be speaking h2). See https://crbug.com/631988.
+ if (ssl_session_cache_lookup_count_ && negotiated_protocol_ == kProtoHTTP2 &&
+ SSL_session_reused(ssl_.get())) {
+ UMA_HISTOGRAM_EXACT_LINEAR("Net.SSLSessionConcurrentLookupCount",
+ ssl_session_cache_lookup_count_, 20);
+ }
+
RecordNegotiatedProtocol();
RecordChannelIDSupport();
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698