| 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 <utility> | 7 #include <utility> |
| 8 | 8 |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/bind_helpers.h" | 10 #include "base/bind_helpers.h" |
| (...skipping 365 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 376 SSLCipherSuiteToStrings(&str, &cipher_str, &mac_str, &is_aead, | 376 SSLCipherSuiteToStrings(&str, &cipher_str, &mac_str, &is_aead, |
| 377 cipher_suite); | 377 cipher_suite); |
| 378 // UMA_HISTOGRAM_... macros cache the Histogram instance and thus only work | 378 // UMA_HISTOGRAM_... macros cache the Histogram instance and thus only work |
| 379 // if the histogram name is constant, so don't generate it dynamically. | 379 // if the histogram name is constant, so don't generate it dynamically. |
| 380 if (strncmp(str, "DHE_", 4) == 0) { | 380 if (strncmp(str, "DHE_", 4) == 0) { |
| 381 UMA_HISTOGRAM_SPARSE_SLOWLY("Net.SSL_KeyExchange.DHE", | 381 UMA_HISTOGRAM_SPARSE_SLOWLY("Net.SSL_KeyExchange.DHE", |
| 382 ssl_info.key_exchange_info); | 382 ssl_info.key_exchange_info); |
| 383 } else if (strncmp(str, "ECDHE_", 6) == 0) { | 383 } else if (strncmp(str, "ECDHE_", 6) == 0) { |
| 384 UMA_HISTOGRAM_SPARSE_SLOWLY("Net.SSL_KeyExchange.ECDHE", | 384 UMA_HISTOGRAM_SPARSE_SLOWLY("Net.SSL_KeyExchange.ECDHE", |
| 385 ssl_info.key_exchange_info); | 385 ssl_info.key_exchange_info); |
| 386 } else if (strncmp(str, "CECPQ1_", 7) == 0) { |
| 387 // Nothing. |
| 386 } else { | 388 } else { |
| 387 DCHECK_EQ(0, strcmp(str, "RSA")); | 389 DCHECK_EQ(0, strcmp(str, "RSA")); |
| 388 } | 390 } |
| 389 | 391 |
| 390 if (ssl_info.handshake_type == SSLInfo::HANDSHAKE_RESUME) { | 392 if (ssl_info.handshake_type == SSLInfo::HANDSHAKE_RESUME) { |
| 391 UMA_HISTOGRAM_CUSTOM_TIMES("Net.SSL_Connection_Latency_Resume_Handshake", | 393 UMA_HISTOGRAM_CUSTOM_TIMES("Net.SSL_Connection_Latency_Resume_Handshake", |
| 392 connect_duration, | 394 connect_duration, |
| 393 base::TimeDelta::FromMilliseconds(1), | 395 base::TimeDelta::FromMilliseconds(1), |
| 394 base::TimeDelta::FromMinutes(1), | 396 base::TimeDelta::FromMinutes(1), |
| 395 100); | 397 100); |
| (...skipping 272 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 668 if (base_.CloseOneIdleSocket()) | 670 if (base_.CloseOneIdleSocket()) |
| 669 return true; | 671 return true; |
| 670 return base_.CloseOneIdleConnectionInHigherLayeredPool(); | 672 return base_.CloseOneIdleConnectionInHigherLayeredPool(); |
| 671 } | 673 } |
| 672 | 674 |
| 673 void SSLClientSocketPool::OnSSLConfigChanged() { | 675 void SSLClientSocketPool::OnSSLConfigChanged() { |
| 674 FlushWithError(ERR_NETWORK_CHANGED); | 676 FlushWithError(ERR_NETWORK_CHANGED); |
| 675 } | 677 } |
| 676 | 678 |
| 677 } // namespace net | 679 } // namespace net |
| OLD | NEW |