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

Unified Diff: net/socket/ssl_client_socket_impl.cc

Issue 2243453002: Replace SSLProtocolNegotiation histogram with SSLNegotiatedAlpnProtocol. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase. Created 4 years, 3 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.h ('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_impl.cc
diff --git a/net/socket/ssl_client_socket_impl.cc b/net/socket/ssl_client_socket_impl.cc
index 94f7f1c418bbc3cb5a22c71873d159d07815e818..379c9ed7da0be249fb6ed44534b500583a2df732 100644
--- a/net/socket/ssl_client_socket_impl.cc
+++ b/net/socket/ssl_client_socket_impl.cc
@@ -1215,7 +1215,7 @@ int SSLClientSocketImpl::DoHandshakeComplete(int result) {
}
}
- RecordNegotiationExtension();
+ RecordNegotiatedProtocol();
RecordChannelIDSupport();
const uint8_t* ocsp_response_raw;
@@ -2338,26 +2338,9 @@ void SSLClientSocketImpl::LogConnectEndEvent(int rv) {
base::Bind(&NetLogSSLInfoCallback, base::Unretained(this)));
}
-void SSLClientSocketImpl::RecordNegotiationExtension() const {
- if (negotiation_extension_ == kExtensionUnknown)
- return;
- if (npn_status_ == kNextProtoUnsupported)
- return;
- base::HistogramBase::Sample sample =
- static_cast<base::HistogramBase::Sample>(negotiated_protocol_);
- // In addition to the protocol negotiated, we want to record which TLS
- // extension was used, and in case of NPN, whether there was overlap between
- // server and client list of supported protocols.
- if (negotiation_extension_ == kExtensionNPN) {
- if (npn_status_ == kNextProtoNoOverlap) {
- sample += 1000;
- } else {
- sample += 500;
- }
- } else {
- DCHECK_EQ(kExtensionALPN, negotiation_extension_);
- }
- UMA_HISTOGRAM_SPARSE_SLOWLY("Net.SSLProtocolNegotiation", sample);
+void SSLClientSocketImpl::RecordNegotiatedProtocol() const {
+ UMA_HISTOGRAM_ENUMERATION("Net.SSLNegotiatedAlpnProtocol",
+ negotiated_protocol_, kProtoLast + 1);
}
void SSLClientSocketImpl::RecordChannelIDSupport() const {
« no previous file with comments | « net/socket/ssl_client_socket_impl.h ('k') | tools/metrics/histograms/histograms.xml » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698