| 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_macros.h" | 10 #include "base/metrics/histogram_macros.h" |
| (...skipping 354 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 365 100); | 365 100); |
| 366 | 366 |
| 367 SSLInfo ssl_info; | 367 SSLInfo ssl_info; |
| 368 bool has_ssl_info = ssl_socket_->GetSSLInfo(&ssl_info); | 368 bool has_ssl_info = ssl_socket_->GetSSLInfo(&ssl_info); |
| 369 DCHECK(has_ssl_info); | 369 DCHECK(has_ssl_info); |
| 370 | 370 |
| 371 UMA_HISTOGRAM_ENUMERATION("Net.SSLVersion", SSLConnectionStatusToVersion( | 371 UMA_HISTOGRAM_ENUMERATION("Net.SSLVersion", SSLConnectionStatusToVersion( |
| 372 ssl_info.connection_status), | 372 ssl_info.connection_status), |
| 373 SSL_CONNECTION_VERSION_MAX); | 373 SSL_CONNECTION_VERSION_MAX); |
| 374 | 374 |
| 375 uint16 cipher_suite = | 375 uint16_t cipher_suite = |
| 376 SSLConnectionStatusToCipherSuite(ssl_info.connection_status); | 376 SSLConnectionStatusToCipherSuite(ssl_info.connection_status); |
| 377 UMA_HISTOGRAM_SPARSE_SLOWLY("Net.SSL_CipherSuite", cipher_suite); | 377 UMA_HISTOGRAM_SPARSE_SLOWLY("Net.SSL_CipherSuite", cipher_suite); |
| 378 | 378 |
| 379 const char *str, *cipher_str, *mac_str; | 379 const char *str, *cipher_str, *mac_str; |
| 380 bool is_aead; | 380 bool is_aead; |
| 381 SSLCipherSuiteToStrings(&str, &cipher_str, &mac_str, &is_aead, | 381 SSLCipherSuiteToStrings(&str, &cipher_str, &mac_str, &is_aead, |
| 382 cipher_suite); | 382 cipher_suite); |
| 383 // UMA_HISTOGRAM_... macros cache the Histogram instance and thus only work | 383 // UMA_HISTOGRAM_... macros cache the Histogram instance and thus only work |
| 384 // if the histogram name is constant, so don't generate it dynamically. | 384 // if the histogram name is constant, so don't generate it dynamically. |
| 385 if (strcmp(str, "RSA") == 0) { | 385 if (strcmp(str, "RSA") == 0) { |
| (...skipping 295 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 681 if (base_.CloseOneIdleSocket()) | 681 if (base_.CloseOneIdleSocket()) |
| 682 return true; | 682 return true; |
| 683 return base_.CloseOneIdleConnectionInHigherLayeredPool(); | 683 return base_.CloseOneIdleConnectionInHigherLayeredPool(); |
| 684 } | 684 } |
| 685 | 685 |
| 686 void SSLClientSocketPool::OnSSLConfigChanged() { | 686 void SSLClientSocketPool::OnSSLConfigChanged() { |
| 687 FlushWithError(ERR_NETWORK_CHANGED); | 687 FlushWithError(ERR_NETWORK_CHANGED); |
| 688 } | 688 } |
| 689 | 689 |
| 690 } // namespace net | 690 } // namespace net |
| OLD | NEW |