| 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 414 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 425 UMA_HISTOGRAM_CUSTOM_TIMES("Net.SSL_Connection_Latency_Google_" | 425 UMA_HISTOGRAM_CUSTOM_TIMES("Net.SSL_Connection_Latency_Google_" |
| 426 "Full_Handshake", | 426 "Full_Handshake", |
| 427 connect_duration, | 427 connect_duration, |
| 428 base::TimeDelta::FromMilliseconds(1), | 428 base::TimeDelta::FromMilliseconds(1), |
| 429 base::TimeDelta::FromMinutes(1), | 429 base::TimeDelta::FromMinutes(1), |
| 430 100); | 430 100); |
| 431 | 431 |
| 432 // These are hosts that we expect to always offer CECPQ1. Connections | 432 // These are hosts that we expect to always offer CECPQ1. Connections |
| 433 // to them, whether or not this browser is in the experiment group, form | 433 // to them, whether or not this browser is in the experiment group, form |
| 434 // the basis of our comparisons. | 434 // the basis of our comparisons. |
| 435 bool cecpq1_supported = | 435 bool cecpq1_expected_to_be_offered = |
| 436 ssl_info.is_issued_by_known_root && |
| 436 (host == "play.google.com" || host == "checkout.google.com" || | 437 (host == "play.google.com" || host == "checkout.google.com" || |
| 437 host == "wallet.google.com"); | 438 host == "wallet.google.com"); |
| 438 if (cecpq1_supported) { | 439 if (cecpq1_expected_to_be_offered) { |
| 439 UMA_HISTOGRAM_CUSTOM_TIMES( | 440 UMA_HISTOGRAM_CUSTOM_TIMES( |
| 440 "Net.SSL_Connection_Latency_PostQuantumSupported_Full_Handshake", | 441 "Net.SSL_Connection_Latency_PostQuantumSupported_Full_Handshake", |
| 441 connect_duration, base::TimeDelta::FromMilliseconds(1), | 442 connect_duration, base::TimeDelta::FromMilliseconds(1), |
| 442 base::TimeDelta::FromMinutes(1), 100); | 443 base::TimeDelta::FromMinutes(1), 100); |
| 443 if (SSLClientSocket::IsPostQuantumExperimentEnabled()) { | 444 if (SSLClientSocket::IsPostQuantumExperimentEnabled()) { |
| 444 // But don't trust that these hosts offer CECPQ1: make sure. If | 445 // But don't trust that these hosts offer CECPQ1: make sure. If |
| 445 // we're doing everything right on the server side, |is_cecpq1| | 446 // we're doing everything right on the server side, |is_cecpq1| |
| 446 // should always be true if we get here, modulo MITM. | 447 // should always be true if we get here, modulo MITM. |
| 447 UMA_HISTOGRAM_BOOLEAN("Net.SSL_Connection_PostQuantum_Negotiated", | 448 UMA_HISTOGRAM_BOOLEAN("Net.SSL_Connection_PostQuantum_Negotiated", |
| 448 is_cecpq1); | 449 is_cecpq1); |
| (...skipping 242 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 691 if (base_.CloseOneIdleSocket()) | 692 if (base_.CloseOneIdleSocket()) |
| 692 return true; | 693 return true; |
| 693 return base_.CloseOneIdleConnectionInHigherLayeredPool(); | 694 return base_.CloseOneIdleConnectionInHigherLayeredPool(); |
| 694 } | 695 } |
| 695 | 696 |
| 696 void SSLClientSocketPool::OnSSLConfigChanged() { | 697 void SSLClientSocketPool::OnSSLConfigChanged() { |
| 697 FlushWithError(ERR_NETWORK_CHANGED); | 698 FlushWithError(ERR_NETWORK_CHANGED); |
| 698 } | 699 } |
| 699 | 700 |
| 700 } // namespace net | 701 } // namespace net |
| OLD | NEW |