Commit 10bdf01c authored by jeremyim's avatar jeremyim Committed by Commit bot

Add SSL Connection Error UMA.

BUG=440443

Review URL: https://codereview.chromium.org/885763002

Cr-Commit-Position: refs/heads/master@{#313802}
parent 08526340
......@@ -18,6 +18,7 @@
#include "base/environment.h"
#include "base/memory/singleton.h"
#include "base/metrics/histogram.h"
#include "base/metrics/sparse_histogram.h"
#include "base/profiler/scoped_tracker.h"
#include "base/strings/string_piece.h"
#include "base/synchronization/lock.h"
......@@ -468,6 +469,7 @@ int SSLClientSocketOpenSSL::Connect(const CompletionCallback& callback) {
int rv = Init();
if (rv != OK) {
net_log_.EndEventWithNetErrorCode(NetLog::TYPE_SSL_CONNECT, rv);
UMA_HISTOGRAM_SPARSE_SLOWLY("Net.SSL_Connection_Error", std::abs(rv));
return rv;
}
......@@ -480,6 +482,7 @@ int SSLClientSocketOpenSSL::Connect(const CompletionCallback& callback) {
user_connect_callback_ = callback;
} else {
net_log_.EndEventWithNetErrorCode(NetLog::TYPE_SSL_CONNECT, rv);
UMA_HISTOGRAM_SPARSE_SLOWLY("Net.SSL_Connection_Error", std::abs(rv));
if (rv < OK)
OnHandshakeCompletion();
}
......@@ -1359,6 +1362,7 @@ void SSLClientSocketOpenSSL::OnHandshakeIOComplete(int result) {
int rv = DoHandshakeLoop(result);
if (rv != ERR_IO_PENDING) {
net_log_.EndEventWithNetErrorCode(NetLog::TYPE_SSL_CONNECT, rv);
UMA_HISTOGRAM_SPARSE_SLOWLY("Net.SSL_Connection_Error", std::abs(rv));
DoConnectCallback(rv);
}
}
......
......@@ -19145,6 +19145,13 @@ Therefore, the affected-histogram name has to have at least one dot in it.
<summary>The SSL/TLS cipher suite that was negotiated.</summary>
</histogram>
<histogram name="Net.SSL_Connection_Error" enum="NetErrorCodes">
<owner>agl@chromium.org</owner>
<summary>
Counts of specific error codes returned when opening an SSL connection.
</summary>
</histogram>
<histogram name="Net.SSL_Connection_Latency" units="milliseconds">
<obsolete>
Replaced by Net.SSL_Connection_Latency_2 on 2014-10-21.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment