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

Unified Diff: net/socket/ssl_client_socket_pool.cc

Issue 2192053002: Metric & meta-metric for CECPQ1 handshake latency. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix an unreachable code error (Windows compiler) Created 4 years, 4 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 | « net/socket/ssl_client_socket_impl.cc ('k') | tools/metrics/histograms/histograms.xml » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/socket/ssl_client_socket_pool.cc
diff --git a/net/socket/ssl_client_socket_pool.cc b/net/socket/ssl_client_socket_pool.cc
index 9364295633615b465e6927263c61e249411aee0c..e8f643b7d158ceac4f6100653b635d658878656b 100644
--- a/net/socket/ssl_client_socket_pool.cc
+++ b/net/socket/ssl_client_socket_pool.cc
@@ -373,6 +373,7 @@ int SSLConnectJob::DoSSLConnectComplete(int result) {
const char *str, *cipher_str, *mac_str;
bool is_aead;
+ bool is_cecpq1 = false;
SSLCipherSuiteToStrings(&str, &cipher_str, &mac_str, &is_aead,
cipher_suite);
// UMA_HISTOGRAM_... macros cache the Histogram instance and thus only work
@@ -384,7 +385,7 @@ int SSLConnectJob::DoSSLConnectComplete(int result) {
UMA_HISTOGRAM_SPARSE_SLOWLY("Net.SSL_KeyExchange.ECDHE",
ssl_info.key_exchange_info);
} else if (strncmp(str, "CECPQ1_", 7) == 0) {
- // Nothing.
+ is_cecpq1 = true;
} else {
DCHECK_EQ(0, strcmp(str, "RSA"));
}
@@ -427,6 +428,26 @@ int SSLConnectJob::DoSSLConnectComplete(int result) {
base::TimeDelta::FromMilliseconds(1),
base::TimeDelta::FromMinutes(1),
100);
+
+ // These are hosts that we expect to always offer CECPQ1. Connections
+ // to them, whether or not this browser is in the experiment group, form
+ // the basis of our comparisons.
+ bool cecpq1_supported =
+ (host == "play.google.com" || host == "checkout.google.com" ||
+ host == "wallet.google.com");
+ if (cecpq1_supported) {
+ UMA_HISTOGRAM_CUSTOM_TIMES(
+ "Net.SSL_Connection_Latency_PostQuantumSupported_Full_Handshake",
+ connect_duration, base::TimeDelta::FromMilliseconds(1),
+ base::TimeDelta::FromMinutes(1), 100);
+ if (SSLClientSocket::IsPostQuantumExperimentEnabled()) {
+ // But don't trust that these hosts offer CECPQ1: make sure. If
+ // we're doing everything right on the server side, |is_cecpq1|
+ // should always be true if we get here, modulo MITM.
+ UMA_HISTOGRAM_BOOLEAN("Net.SSL_Connection_PostQuantum_Negotiated",
+ is_cecpq1);
+ }
+ }
}
}
}
« no previous file with comments | « net/socket/ssl_client_socket_impl.cc ('k') | tools/metrics/histograms/histograms.xml » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698