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

Unified Diff: net/socket/ssl_client_socket_openssl.cc

Issue 869393005: Perform ClientHello padding if the field trial is enabled (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@net_connection_error_uma
Patch Set: Re-implementation Created 5 years, 11 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
Index: net/socket/ssl_client_socket_openssl.cc
diff --git a/net/socket/ssl_client_socket_openssl.cc b/net/socket/ssl_client_socket_openssl.cc
index c4af9575f1e447939f3e76fbce7f43fd4896cf92..3a0126f5ca11146c2e3100cadad8716b682843f5 100644
--- a/net/socket/ssl_client_socket_openssl.cc
+++ b/net/socket/ssl_client_socket_openssl.cc
@@ -474,12 +474,18 @@ int SSLClientSocketOpenSSL::Connect(const CompletionCallback& callback) {
if (rv != OK) {
net_log_.EndEventWithNetErrorCode(NetLog::TYPE_SSL_CONNECT, rv);
UMA_HISTOGRAM_SPARSE_SLOWLY("Net.SSL_Connection_Error", std::abs(rv));
+ if (ssl_config_.fastradio_padding_eligible)
+ UMA_HISTOGRAM_SPARSE_SLOWLY("Net.SSL_Connection_Error_ClientPadding",
+ std::abs(rv));
return rv;
}
// Set SSL to client mode. Handshake happens in the loop below.
SSL_set_connect_state(ssl_);
+ // Enable fastradio padding.
+ SSL_enable_fastradio_padding(ssl_, ssl_config_.enable_fastradio_padding);
+
GotoState(STATE_HANDSHAKE);
rv = DoHandshakeLoop(OK);
if (rv == ERR_IO_PENDING) {
@@ -487,6 +493,9 @@ int SSLClientSocketOpenSSL::Connect(const CompletionCallback& callback) {
} else {
net_log_.EndEventWithNetErrorCode(NetLog::TYPE_SSL_CONNECT, rv);
UMA_HISTOGRAM_SPARSE_SLOWLY("Net.SSL_Connection_Error", std::abs(rv));
+ if (ssl_config_.fastradio_padding_eligible)
+ UMA_HISTOGRAM_SPARSE_SLOWLY("Net.SSL_Connection_Error_ClientPadding",
+ std::abs(rv));
if (rv < OK)
OnHandshakeCompletion();
}
@@ -1367,6 +1376,9 @@ void SSLClientSocketOpenSSL::OnHandshakeIOComplete(int 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));
+ if (ssl_config_.fastradio_padding_eligible)
+ UMA_HISTOGRAM_SPARSE_SLOWLY("Net.SSL_Connection_Error_ClientPadding",
+ std::abs(rv));
DoConnectCallback(rv);
}
}

Powered by Google App Engine
This is Rietveld 408576698