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

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

Issue 5777005: net: fix verification merge savings calculations. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 10 years 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 | « net/socket/ssl_host_info.h ('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_host_info.h" 5 #include "net/socket/ssl_host_info.h"
6 6
7 #include "base/metrics/histogram.h" 7 #include "base/metrics/histogram.h"
8 #include "base/string_piece.h" 8 #include "base/string_piece.h"
9 #include "net/base/cert_verifier.h" 9 #include "net/base/cert_verifier.h"
10 #include "net/base/ssl_config_service.h" 10 #include "net/base/ssl_config_service.h"
(...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after
157 cert_verification_callback_ = callback; 157 cert_verification_callback_ = callback;
158 return ERR_IO_PENDING; 158 return ERR_IO_PENDING;
159 } 159 }
160 160
161 void SSLHostInfo::VerifyCallback(int rv) { 161 void SSLHostInfo::VerifyCallback(int rv) {
162 DCHECK(!verification_start_time_.is_null()); 162 DCHECK(!verification_start_time_.is_null());
163 base::TimeTicks now = base::TimeTicks::Now(); 163 base::TimeTicks now = base::TimeTicks::Now();
164 const base::TimeDelta duration = now - verification_start_time(); 164 const base::TimeDelta duration = now - verification_start_time();
165 UMA_HISTOGRAM_TIMES("Net.SSLHostInfoVerificationTimeMs", duration); 165 UMA_HISTOGRAM_TIMES("Net.SSLHostInfoVerificationTimeMs", duration);
166 VLOG(1) << "Verification took " << duration.InMilliseconds() << "ms"; 166 VLOG(1) << "Verification took " << duration.InMilliseconds() << "ms";
167 verification_end_time_ = now;
167 cert_verification_complete_ = true; 168 cert_verification_complete_ = true;
168 cert_verification_error_ = rv; 169 cert_verification_error_ = rv;
169 if (cert_verification_callback_) { 170 if (cert_verification_callback_) {
170 CompletionCallback* callback = cert_verification_callback_; 171 CompletionCallback* callback = cert_verification_callback_;
171 cert_verification_callback_ = NULL; 172 cert_verification_callback_ = NULL;
172 callback->Run(rv); 173 callback->Run(rv);
173 } 174 }
174 } 175 }
175 176
176 SSLHostInfoFactory::~SSLHostInfoFactory() {} 177 SSLHostInfoFactory::~SSLHostInfoFactory() {}
177 178
178 } // namespace net 179 } // namespace net
OLDNEW
« no previous file with comments | « net/socket/ssl_host_info.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698