Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(52)

Side by Side Diff: net/socket/ssl_client_socket_pool.cc

Issue 6544004: Add field trial for A/B testing of SSL False Start. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chrome/renderer/page_load_histograms.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « chrome/renderer/page_load_histograms.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698