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

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

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/base/mime_util.h ('k') | net/cert/caching_cert_verifier.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 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 #ifndef NET_CERT_CACHING_CERT_VERIFIER_H_ 5 #ifndef NET_CERT_CACHING_CERT_VERIFIER_H_
6 #define NET_CERT_CACHING_CERT_VERIFIER_H_ 6 #define NET_CERT_CACHING_CERT_VERIFIER_H_
7 7
8 #include <memory> 8 #include <memory>
9 9
10 #include "net/base/expiring_cache.h" 10 #include "net/base/expiring_cache.h"
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after
137 137
138 // Adds |verify_result| and |error| to the cache for |params|, whose 138 // Adds |verify_result| and |error| to the cache for |params|, whose
139 // verification attempt began at |start_time|. See the implementation 139 // verification attempt began at |start_time|. See the implementation
140 // for more details about the necessity of |start_time|. 140 // for more details about the necessity of |start_time|.
141 void AddResultToCache(const RequestParams& params, 141 void AddResultToCache(const RequestParams& params,
142 base::Time start_time, 142 base::Time start_time,
143 const CertVerifyResult& verify_result, 143 const CertVerifyResult& verify_result,
144 int error); 144 int error);
145 145
146 // CertDatabase::Observer methods: 146 // CertDatabase::Observer methods:
147 void OnCACertChanged(const X509Certificate* cert) override; 147 void OnCertDBChanged(const X509Certificate* cert) override;
148 148
149 // For unit testing. 149 // For unit testing.
150 void ClearCache(); 150 void ClearCache();
151 size_t GetCacheSize() const; 151 size_t GetCacheSize() const;
152 uint64_t cache_hits() const { return cache_hits_; } 152 uint64_t cache_hits() const { return cache_hits_; }
153 uint64_t requests() const { return requests_; } 153 uint64_t requests() const { return requests_; }
154 154
155 std::unique_ptr<CertVerifier> verifier_; 155 std::unique_ptr<CertVerifier> verifier_;
156 156
157 CertVerificationCache cache_; 157 CertVerificationCache cache_;
158 158
159 uint64_t requests_; 159 uint64_t requests_;
160 uint64_t cache_hits_; 160 uint64_t cache_hits_;
161 161
162 DISALLOW_COPY_AND_ASSIGN(CachingCertVerifier); 162 DISALLOW_COPY_AND_ASSIGN(CachingCertVerifier);
163 }; 163 };
164 164
165 } // namespace net 165 } // namespace net
166 166
167 #endif // NET_CERT_CACHING_CERT_VERIFIER_H_ 167 #endif // NET_CERT_CACHING_CERT_VERIFIER_H_
OLDNEW
« no previous file with comments | « net/base/mime_util.h ('k') | net/cert/caching_cert_verifier.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698