summaryrefslogtreecommitdiffstats
path: root/net/socket/ssl_host_info.cc
diff options
context:
space:
mode:
authoragl@chromium.org <agl@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-12-15 16:12:41 +0000
committeragl@chromium.org <agl@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-12-15 16:12:41 +0000
commit2bbe2d55ce7ac22070c86346a0948435e03707c9 (patch)
treec635d31bb8d3ec0fded123223ed98a778780a236 /net/socket/ssl_host_info.cc
parent2d71bd10643da807fe2407a48b02629207d7b70d (diff)
downloadchromium_src-2bbe2d55ce7ac22070c86346a0948435e03707c9.zip
chromium_src-2bbe2d55ce7ac22070c86346a0948435e03707c9.tar.gz
chromium_src-2bbe2d55ce7ac22070c86346a0948435e03707c9.tar.bz2
net: fix verification merge savings calculations.
Previously we miscalculated the amount of time saved by merging certificate verification. We should have been counting the time from the start of the verification till the time when we needed it because the verification may have completed. In the case that the verification has already completed, only count the amount of time that it took. BUG=none TEST=none http://codereview.chromium.org/5777005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@69265 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/socket/ssl_host_info.cc')
-rw-r--r--net/socket/ssl_host_info.cc2
1 files changed, 2 insertions, 0 deletions
diff --git a/net/socket/ssl_host_info.cc b/net/socket/ssl_host_info.cc
index 104f0c8..8c1b79f 100644
--- a/net/socket/ssl_host_info.cc
+++ b/net/socket/ssl_host_info.cc
@@ -113,6 +113,7 @@ bool SSLHostInfo::ParseInner(const std::string& data) {
verifier_.reset(new CertVerifier);
VLOG(1) << "Kicking off verification for " << hostname_;
verification_start_time_ = base::TimeTicks::Now();
+ verification_end_time_ = base::TimeTicks();
if (verifier_->Verify(cert_.get(), hostname_, flags,
&cert_verify_result_, callback_) == OK) {
VerifyCallback(OK);
@@ -185,6 +186,7 @@ void SSLHostInfo::VerifyCallback(int rv) {
const base::TimeDelta duration = now - verification_start_time();
UMA_HISTOGRAM_TIMES("Net.SSLHostInfoVerificationTimeMs", duration);
VLOG(1) << "Verification took " << duration.InMilliseconds() << "ms";
+ verification_end_time_ = now;
cert_verification_complete_ = true;
cert_verification_error_ = rv;
if (cert_verification_callback_) {