Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "net/socket/ssl_client_socket_pool.h" | 5 #include "net/socket/ssl_client_socket_pool.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/bind_helpers.h" | 8 #include "base/bind_helpers.h" |
| 9 #include "base/metrics/field_trial.h" | 9 #include "base/metrics/field_trial.h" |
| 10 #include "base/metrics/histogram.h" | 10 #include "base/metrics/histogram.h" |
| (...skipping 539 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 550 } | 550 } |
| 551 | 551 |
| 552 if (result == OK || IsCertificateError(result)) { | 552 if (result == OK || IsCertificateError(result)) { |
| 553 SetSocket(ssl_socket_.Pass()); | 553 SetSocket(ssl_socket_.Pass()); |
| 554 } else if (result == ERR_SSL_CLIENT_AUTH_CERT_NEEDED) { | 554 } else if (result == ERR_SSL_CLIENT_AUTH_CERT_NEEDED) { |
| 555 error_response_info_.cert_request_info = new SSLCertRequestInfo; | 555 error_response_info_.cert_request_info = new SSLCertRequestInfo; |
| 556 ssl_socket_->GetSSLCertRequestInfo( | 556 ssl_socket_->GetSSLCertRequestInfo( |
| 557 error_response_info_.cert_request_info.get()); | 557 error_response_info_.cert_request_info.get()); |
| 558 } | 558 } |
| 559 | 559 |
| 560 UMA_HISTOGRAM_SPARSE_SLOWLY("Net.SSL_Connection_Error", std::abs(result)); | |
| 561 if (params_->ssl_config().fastradio_padding_eligible) { | |
| 562 UMA_HISTOGRAM_SPARSE_SLOWLY("Net.SSL_Connection_Error_FastRadioPadding", | |
| 563 std::abs(result)); | |
| 564 } | |
|
Ryan Sleevi
2015/02/09 19:42:34
For consistency with the rest of the code, seems l
jeremyim
2015/02/09 21:32:16
Done.
| |
| 565 | |
| 560 return result; | 566 return result; |
| 561 } | 567 } |
| 562 | 568 |
| 563 void SSLConnectJob::ResumeSSLConnection() { | 569 void SSLConnectJob::ResumeSSLConnection() { |
| 564 DCHECK_EQ(next_state_, STATE_SSL_CONNECT); | 570 DCHECK_EQ(next_state_, STATE_SSL_CONNECT); |
| 565 messenger_ = NULL; | 571 messenger_ = NULL; |
| 566 OnIOComplete(OK); | 572 OnIOComplete(OK); |
| 567 } | 573 } |
| 568 | 574 |
| 569 SSLConnectJob::State SSLConnectJob::GetInitialState( | 575 SSLConnectJob::State SSLConnectJob::GetInitialState( |
| (...skipping 269 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 839 CHECK(it != messenger_map_.end()); | 845 CHECK(it != messenger_map_.end()); |
| 840 delete it->second; | 846 delete it->second; |
| 841 messenger_map_.erase(it); | 847 messenger_map_.erase(it); |
| 842 } | 848 } |
| 843 | 849 |
| 844 void SSLClientSocketPool::OnSSLConfigChanged() { | 850 void SSLClientSocketPool::OnSSLConfigChanged() { |
| 845 FlushWithError(ERR_NETWORK_CHANGED); | 851 FlushWithError(ERR_NETWORK_CHANGED); |
| 846 } | 852 } |
| 847 | 853 |
| 848 } // namespace net | 854 } // namespace net |
| OLD | NEW |