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

Side by Side Diff: net/cert/caching_cert_verifier.cc

Issue 2363653002: Cleanup unreachable cert adding code (Closed)
Patch Set: Rebased Created 4 years, 2 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/cert/caching_cert_verifier.h ('k') | net/cert/cert_database.h » ('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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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/cert/caching_cert_verifier.h" 5 #include "net/cert/caching_cert_verifier.h"
6 6
7 #include "base/time/time.h" 7 #include "base/time/time.h"
8 #include "net/base/net_errors.h" 8 #include "net/base/net_errors.h"
9 9
10 namespace net { 10 namespace net {
(...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after
191 if (!expiration_cmp(now, it.expiration())) 191 if (!expiration_cmp(now, it.expiration()))
192 continue; 192 continue;
193 if (!visitor->VisitEntry(it.key(), it.value().error, it.value().result, 193 if (!visitor->VisitEntry(it.key(), it.value().error, it.value().result,
194 it.expiration().verification_time, 194 it.expiration().verification_time,
195 it.expiration().expiration_time)) { 195 it.expiration().expiration_time)) {
196 break; 196 break;
197 } 197 }
198 } 198 }
199 } 199 }
200 200
201 void CachingCertVerifier::OnCACertChanged(const X509Certificate* cert) { 201 void CachingCertVerifier::OnCertDBChanged(const X509Certificate* cert) {
202 ClearCache(); 202 ClearCache();
203 } 203 }
204 204
205 void CachingCertVerifier::ClearCache() { 205 void CachingCertVerifier::ClearCache() {
206 cache_.Clear(); 206 cache_.Clear();
207 } 207 }
208 208
209 size_t CachingCertVerifier::GetCacheSize() const { 209 size_t CachingCertVerifier::GetCacheSize() const {
210 return cache_.size(); 210 return cache_.size();
211 } 211 }
212 212
213 } // namespace net 213 } // namespace net
OLDNEW
« no previous file with comments | « net/cert/caching_cert_verifier.h ('k') | net/cert/cert_database.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698