Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/metrics/field_trial.h" | 7 #include "base/metrics/field_trial.h" |
| 8 #include "base/metrics/histogram.h" | 8 #include "base/metrics/histogram.h" |
| 9 #include "base/values.h" | 9 #include "base/values.h" |
| 10 #include "net/base/net_errors.h" | 10 #include "net/base/net_errors.h" |
| (...skipping 311 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 322 ssl_socket_->IgnoreCertError(result, params_->load_flags())) { | 322 ssl_socket_->IgnoreCertError(result, params_->load_flags())) { |
| 323 DCHECK(ssl_connect_start_time_ != base::TimeTicks()); | 323 DCHECK(ssl_connect_start_time_ != base::TimeTicks()); |
| 324 base::TimeDelta connect_duration = | 324 base::TimeDelta connect_duration = |
| 325 base::TimeTicks::Now() - ssl_connect_start_time_; | 325 base::TimeTicks::Now() - ssl_connect_start_time_; |
| 326 if (using_spdy) { | 326 if (using_spdy) { |
| 327 UMA_HISTOGRAM_CUSTOM_TIMES("Net.SpdyConnectionLatency", | 327 UMA_HISTOGRAM_CUSTOM_TIMES("Net.SpdyConnectionLatency", |
| 328 connect_duration, | 328 connect_duration, |
| 329 base::TimeDelta::FromMilliseconds(1), | 329 base::TimeDelta::FromMilliseconds(1), |
| 330 base::TimeDelta::FromMinutes(10), | 330 base::TimeDelta::FromMinutes(10), |
| 331 100); | 331 100); |
| 332 } else { | 332 } |
| 333 UMA_HISTOGRAM_CUSTOM_TIMES("Net.SSL_Connection_Latency", | 333 |
| 334 UMA_HISTOGRAM_CUSTOM_TIMES("Net.SSL_Connection_Latency", | |
|
Mike Belshe
2011/06/08 04:50:38
note: you're changing the definition of these his
agl
2011/06/08 18:57:12
Yes, that's was intentional.
| |
| 335 connect_duration, | |
| 336 base::TimeDelta::FromMilliseconds(1), | |
| 337 base::TimeDelta::FromMinutes(10), | |
| 338 100); | |
| 339 | |
| 340 const std::string& host = params_->host_and_port().host(); | |
| 341 bool is_google = host == "google.com" || | |
| 342 (host.size() > 11 && | |
| 343 host.rfind(".google.com") == host.size() - 11); | |
| 344 if (is_google) { | |
| 345 UMA_HISTOGRAM_CUSTOM_TIMES("Net.SSL_Connection_Latency_Google", | |
| 334 connect_duration, | 346 connect_duration, |
| 335 base::TimeDelta::FromMilliseconds(1), | 347 base::TimeDelta::FromMilliseconds(1), |
| 336 base::TimeDelta::FromMinutes(10), | 348 base::TimeDelta::FromMinutes(10), |
| 337 100); | 349 100); |
| 350 } | |
| 338 | 351 |
| 339 const std::string& host = params_->host_and_port().host(); | 352 static const bool rev_checking_trial = |
| 340 bool is_google = host == "google.com" || | 353 base::FieldTrialList::TrialExists("RevCheckingImpact"); |
| 341 (host.size() > 11 && | 354 if (rev_checking_trial) { |
|
Mike Belshe
2011/06/08 04:50:38
I think this is a problem.
You will compare:
a) s
agl
2011/06/08 18:57:12
Yes, I meant to put the histogram in the |is_googl
| |
| 342 host.rfind(".google.com") == host.size() - 11); | 355 UMA_HISTOGRAM_CUSTOM_TIMES(base::FieldTrial::MakeName( |
| 343 if (is_google) { | 356 "Net.SSL_Connection_Latency_Google", |
| 344 UMA_HISTOGRAM_CUSTOM_TIMES("Net.SSL_Connection_Latency_Google", | 357 "RevCheckingImpact"), |
| 345 connect_duration, | 358 connect_duration, |
| 346 base::TimeDelta::FromMilliseconds(1), | 359 base::TimeDelta::FromMilliseconds(1), |
| 347 base::TimeDelta::FromMinutes(10), | 360 base::TimeDelta::FromMinutes(10), |
| 348 100); | 361 100); |
| 349 } | |
| 350 } | 362 } |
| 351 } | 363 } |
| 352 | 364 |
| 353 if (result == OK || IsCertificateError(result)) { | 365 if (result == OK || IsCertificateError(result)) { |
| 354 set_socket(ssl_socket_.release()); | 366 set_socket(ssl_socket_.release()); |
| 355 } else if (result == ERR_SSL_CLIENT_AUTH_CERT_NEEDED) { | 367 } else if (result == ERR_SSL_CLIENT_AUTH_CERT_NEEDED) { |
| 356 error_response_info_.cert_request_info = new SSLCertRequestInfo; | 368 error_response_info_.cert_request_info = new SSLCertRequestInfo; |
| 357 ssl_socket_->GetSSLCertRequestInfo(error_response_info_.cert_request_info); | 369 ssl_socket_->GetSSLCertRequestInfo(error_response_info_.cert_request_info); |
| 358 } | 370 } |
| 359 | 371 |
| (...skipping 201 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 561 | 573 |
| 562 ClientSocketPoolHistograms* SSLClientSocketPool::histograms() const { | 574 ClientSocketPoolHistograms* SSLClientSocketPool::histograms() const { |
| 563 return base_.histograms(); | 575 return base_.histograms(); |
| 564 } | 576 } |
| 565 | 577 |
| 566 void SSLClientSocketPool::OnSSLConfigChanged() { | 578 void SSLClientSocketPool::OnSSLConfigChanged() { |
| 567 Flush(); | 579 Flush(); |
| 568 } | 580 } |
| 569 | 581 |
| 570 } // namespace net | 582 } // namespace net |
| OLD | NEW |