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 6eb59244291e59a909eafd61f0232d96b0c4c6a3..8f8efebe1d25533ecd13657e80b48d037fd5a361 100644 |
--- a/net/socket/ssl_client_socket_openssl.cc |
+++ b/net/socket/ssl_client_socket_openssl.cc |
@@ -39,6 +39,7 @@ |
#include "net/ssl/ssl_cert_request_info.h" |
#include "net/ssl/ssl_connection_status_flags.h" |
#include "net/ssl/ssl_info.h" |
+#include "net/ssl/ssl_socket_config_service.h" |
#if defined(OS_WIN) |
#include "base/win/windows_version.h" |
@@ -374,6 +375,7 @@ SSLClientSocketOpenSSL::SSLClientSocketOpenSSL( |
cert_verifier_(context.cert_verifier), |
cert_transparency_verifier_(context.cert_transparency_verifier), |
channel_id_service_(context.channel_id_service), |
+ ssl_socket_config_service_(context.ssl_socket_config_service), |
ssl_(NULL), |
transport_bio_(NULL), |
transport_(transport_socket.Pass()), |
@@ -470,6 +472,10 @@ 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_socket_config_service_ && |
+ ssl_socket_config_service_->IsGoogle(host_and_port_)) |
+ UMA_HISTOGRAM_SPARSE_SLOWLY("Net.SSL_Connection_Error_Google", |
+ std::abs(rv)); |
return rv; |
} |
@@ -483,6 +489,10 @@ 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_socket_config_service_ && |
+ ssl_socket_config_service_->IsGoogle(host_and_port_)) |
+ UMA_HISTOGRAM_SPARSE_SLOWLY("Net.SSL_Connection_Error_Google", |
+ std::abs(rv)); |
if (rv < OK) |
OnHandshakeCompletion(); |
} |
@@ -882,6 +892,14 @@ int SSLClientSocketOpenSSL::Init() { |
if (IsOCSPStaplingSupported()) |
SSL_enable_ocsp_stapling(ssl_); |
+ if (ssl_socket_config_service_) { |
+ if (ssl_socket_config_service_->UseFastRadioPadding(host_and_port_)) { |
+ SSL_enable_fastradio_padding(ssl_, 1); |
+ } else { |
+ SSL_enable_fastradio_padding(ssl_, 0); |
+ } |
+ } |
+ |
return OK; |
} |
@@ -1363,6 +1381,10 @@ 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_socket_config_service_ && |
+ ssl_socket_config_service_->IsGoogle(host_and_port_)) |
Alexei Svitkine (slow)
2015/01/30 18:16:19
Nit: {}
|
+ UMA_HISTOGRAM_SPARSE_SLOWLY("Net.SSL_Connection_Error_Google", |
+ std::abs(rv)); |
DoConnectCallback(rv); |
} |
} |