Chromium Code Reviews| 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 a80df57d0be4a8d084e62c5d09f1040ee458c962..babd137207e5364a8c80e552ae852c64793ccf65 100644 |
| --- a/net/socket/ssl_client_socket_pool.cc |
| +++ b/net/socket/ssl_client_socket_pool.cc |
| @@ -21,6 +21,7 @@ |
| #include "net/socket/ssl_client_socket.h" |
| #include "net/socket/transport_client_socket_pool.h" |
| #include "net/ssl/ssl_cert_request_info.h" |
| +#include "net/ssl/ssl_cipher_suite_names.h" |
| #include "net/ssl/ssl_connection_status_flags.h" |
| #include "net/ssl/ssl_info.h" |
| @@ -371,9 +372,35 @@ int SSLConnectJob::DoSSLConnectComplete(int result) { |
| ssl_info.connection_status), |
| SSL_CONNECTION_VERSION_MAX); |
| - UMA_HISTOGRAM_SPARSE_SLOWLY("Net.SSL_CipherSuite", |
| - SSLConnectionStatusToCipherSuite( |
| - ssl_info.connection_status)); |
| + uint16 cipher_suite = |
| + SSLConnectionStatusToCipherSuite(ssl_info.connection_status); |
| + UMA_HISTOGRAM_SPARSE_SLOWLY("Net.SSL_CipherSuite", cipher_suite); |
| + |
| + const char *str, *cipher_str, *mac_str; |
| + bool is_aead; |
| + SSLCipherSuiteToStrings(&str, &cipher_str, &mac_str, &is_aead, |
| + cipher_suite); |
| + // UMA_HISTOGRAM_... macros cache the Histogram instance and thus only work |
|
agl
2015/08/26 17:28:02
What decision are we going to make with this data?
sigbjorn
2015/08/27 14:51:38
For now, as long as DH is still supported (for how
|
| + // if the histogram name is constant, so don't generate it dynamically. |
| + if (strncmp(str, "RSA", 3) == 0) { |
| + UMA_HISTOGRAM_SPARSE_SLOWLY("Net.SSL_KeyExchange.RSA", |
| + ssl_info.key_exchange_info); |
| + } else if (strncmp(str, "DHE", 3) == 0) { |
| + UMA_HISTOGRAM_SPARSE_SLOWLY("Net.SSL_KeyExchange.DHE", |
| + ssl_info.key_exchange_info); |
| + } else if (strncmp(str, "DH", 2) == 0) { |
| + UMA_HISTOGRAM_SPARSE_SLOWLY("Net.SSL_KeyExchange.DH", |
| + ssl_info.key_exchange_info); |
| + } else if (strncmp(str, "ECDHE", 5) == 0) { |
| + UMA_HISTOGRAM_SPARSE_SLOWLY("Net.SSL_KeyExchange.ECDHE", |
| + ssl_info.key_exchange_info); |
| + } else if (strncmp(str, "ECDH", 4) == 0) { |
| + UMA_HISTOGRAM_SPARSE_SLOWLY("Net.SSL_KeyExchange.ECDH", |
| + ssl_info.key_exchange_info); |
| + } else { |
| + UMA_HISTOGRAM_SPARSE_SLOWLY("Net.SSL_KeyExchange.Unknown", |
| + ssl_info.key_exchange_info); |
| + } |
| if (ssl_info.handshake_type == SSLInfo::HANDSHAKE_RESUME) { |
| UMA_HISTOGRAM_CUSTOM_TIMES("Net.SSL_Connection_Latency_Resume_Handshake", |