OLD | NEW |
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 Loading... |
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 |
OLD | NEW |