OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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/histogram.h" | 8 #include "base/metrics/histogram.h" |
8 #include "base/values.h" | 9 #include "base/values.h" |
9 #include "net/base/net_errors.h" | 10 #include "net/base/net_errors.h" |
10 #include "net/base/host_port_pair.h" | 11 #include "net/base/host_port_pair.h" |
11 #include "net/base/ssl_cert_request_info.h" | 12 #include "net/base/ssl_cert_request_info.h" |
12 #include "net/http/http_proxy_client_socket.h" | 13 #include "net/http/http_proxy_client_socket.h" |
13 #include "net/http/http_proxy_client_socket_pool.h" | 14 #include "net/http/http_proxy_client_socket_pool.h" |
14 #include "net/socket/client_socket_factory.h" | 15 #include "net/socket/client_socket_factory.h" |
15 #include "net/socket/client_socket_handle.h" | 16 #include "net/socket/client_socket_handle.h" |
16 #include "net/socket/socks_client_socket_pool.h" | 17 #include "net/socket/socks_client_socket_pool.h" |
(...skipping 304 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
321 connect_duration, | 322 connect_duration, |
322 base::TimeDelta::FromMilliseconds(1), | 323 base::TimeDelta::FromMilliseconds(1), |
323 base::TimeDelta::FromMinutes(10), | 324 base::TimeDelta::FromMinutes(10), |
324 100); | 325 100); |
325 } else { | 326 } else { |
326 UMA_HISTOGRAM_CUSTOM_TIMES("Net.SSL_Connection_Latency", | 327 UMA_HISTOGRAM_CUSTOM_TIMES("Net.SSL_Connection_Latency", |
327 connect_duration, | 328 connect_duration, |
328 base::TimeDelta::FromMilliseconds(1), | 329 base::TimeDelta::FromMilliseconds(1), |
329 base::TimeDelta::FromMinutes(10), | 330 base::TimeDelta::FromMinutes(10), |
330 100); | 331 100); |
| 332 |
| 333 static bool false_start_trial( |
| 334 base::FieldTrialList::Find("SSLFalseStart") && |
| 335 !base::FieldTrialList::Find("SSLFalseStart")->group_name().empty()); |
| 336 if (false_start_trial) { |
| 337 UMA_HISTOGRAM_CUSTOM_TIMES(base::FieldTrial::MakeName( |
| 338 "Net.SSL_Connection_Latency", |
| 339 "SSLFalseStart"), |
| 340 connect_duration, |
| 341 base::TimeDelta::FromMilliseconds(1), |
| 342 base::TimeDelta::FromMinutes(10), |
| 343 100); |
| 344 } |
331 } | 345 } |
332 } | 346 } |
333 | 347 |
334 if (result == OK || IsCertificateError(result)) { | 348 if (result == OK || IsCertificateError(result)) { |
335 set_socket(ssl_socket_.release()); | 349 set_socket(ssl_socket_.release()); |
336 } else if (result == ERR_SSL_CLIENT_AUTH_CERT_NEEDED) { | 350 } else if (result == ERR_SSL_CLIENT_AUTH_CERT_NEEDED) { |
337 error_response_info_.cert_request_info = new SSLCertRequestInfo; | 351 error_response_info_.cert_request_info = new SSLCertRequestInfo; |
338 ssl_socket_->GetSSLCertRequestInfo(error_response_info_.cert_request_info); | 352 ssl_socket_->GetSSLCertRequestInfo(error_response_info_.cert_request_info); |
339 } | 353 } |
340 | 354 |
(...skipping 196 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
537 | 551 |
538 ClientSocketPoolHistograms* SSLClientSocketPool::histograms() const { | 552 ClientSocketPoolHistograms* SSLClientSocketPool::histograms() const { |
539 return base_.histograms(); | 553 return base_.histograms(); |
540 } | 554 } |
541 | 555 |
542 void SSLClientSocketPool::OnSSLConfigChanged() { | 556 void SSLClientSocketPool::OnSSLConfigChanged() { |
543 Flush(); | 557 Flush(); |
544 } | 558 } |
545 | 559 |
546 } // namespace net | 560 } // namespace net |
OLD | NEW |