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

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

Issue 454513002: This CL is a follow up to https://codereview.chromium.org/353713005. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 4 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
« no previous file with comments | « net/socket/ssl_client_socket_pool.h ('k') | net/socket/ssl_client_socket_pool_unittest.cc » ('j') | 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) 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 "base/bind.h" 7 #include "base/bind.h"
8 #include "base/bind_helpers.h" 8 #include "base/bind_helpers.h"
9 #include "base/metrics/field_trial.h" 9 #include "base/metrics/field_trial.h"
10 #include "base/metrics/histogram.h" 10 #include "base/metrics/histogram.h"
(...skipping 498 matching lines...) Expand 10 before | Expand all | Expand 10 after
509 100); 509 100);
510 } else if (ssl_info.handshake_type == SSLInfo::HANDSHAKE_FULL) { 510 } else if (ssl_info.handshake_type == SSLInfo::HANDSHAKE_FULL) {
511 UMA_HISTOGRAM_CUSTOM_TIMES("Net.SSL_Connection_Latency_Full_Handshake", 511 UMA_HISTOGRAM_CUSTOM_TIMES("Net.SSL_Connection_Latency_Full_Handshake",
512 connect_duration, 512 connect_duration,
513 base::TimeDelta::FromMilliseconds(1), 513 base::TimeDelta::FromMilliseconds(1),
514 base::TimeDelta::FromMinutes(1), 514 base::TimeDelta::FromMinutes(1),
515 100); 515 100);
516 } 516 }
517 517
518 const std::string& host = params_->host_and_port().host(); 518 const std::string& host = params_->host_and_port().host();
519 bool is_google = 519 bool is_google = host == "google.com" ||
520 host == "google.com" || 520 (host.size() > 11 &&
521 (host.size() > 11 && host.rfind(".google.com") == host.size() - 11); 521 host.rfind(".google.com") == host.size() - 11);
wtc 2014/08/07 21:52:17 Since this change is already checked in, it is not
522 if (is_google) { 522 if (is_google) {
523 UMA_HISTOGRAM_CUSTOM_TIMES("Net.SSL_Connection_Latency_Google2", 523 UMA_HISTOGRAM_CUSTOM_TIMES("Net.SSL_Connection_Latency_Google2",
524 connect_duration, 524 connect_duration,
525 base::TimeDelta::FromMilliseconds(1), 525 base::TimeDelta::FromMilliseconds(1),
526 base::TimeDelta::FromMinutes(1), 526 base::TimeDelta::FromMinutes(1),
527 100); 527 100);
528 if (ssl_info.handshake_type == SSLInfo::HANDSHAKE_RESUME) { 528 if (ssl_info.handshake_type == SSLInfo::HANDSHAKE_RESUME) {
529 UMA_HISTOGRAM_CUSTOM_TIMES("Net.SSL_Connection_Latency_Google_" 529 UMA_HISTOGRAM_CUSTOM_TIMES("Net.SSL_Connection_Latency_Google_"
530 "Resume_Handshake", 530 "Resume_Handshake",
531 connect_duration, 531 connect_duration,
(...skipping 288 matching lines...) Expand 10 before | Expand all | Expand 10 after
820 if (base_.CloseOneIdleSocket()) 820 if (base_.CloseOneIdleSocket())
821 return true; 821 return true;
822 return base_.CloseOneIdleConnectionInHigherLayeredPool(); 822 return base_.CloseOneIdleConnectionInHigherLayeredPool();
823 } 823 }
824 824
825 void SSLClientSocketPool::OnSSLConfigChanged() { 825 void SSLClientSocketPool::OnSSLConfigChanged() {
826 FlushWithError(ERR_NETWORK_CHANGED); 826 FlushWithError(ERR_NETWORK_CHANGED);
827 } 827 }
828 828
829 } // namespace net 829 } // namespace net
OLDNEW
« no previous file with comments | « net/socket/ssl_client_socket_pool.h ('k') | net/socket/ssl_client_socket_pool_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698