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

Unified Diff: ios/web/net/cert_store_impl.h

Issue 2000503002: Remove the fingerprint and ca_fingerprint from X509Certificate (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@move_cache
Patch Set: Fix IDN test Created 4 years, 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ios/web/net/cert_policy.cc ('k') | ios/web/net/cert_store_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ios/web/net/cert_store_impl.h
diff --git a/ios/web/net/cert_store_impl.h b/ios/web/net/cert_store_impl.h
index d4da2f286c525fa173574749a25957fdc5066828..04cde7d80fe78d89b3349f9301afaed5413bc9f1 100644
--- a/ios/web/net/cert_store_impl.h
+++ b/ios/web/net/cert_store_impl.h
@@ -31,7 +31,28 @@ class CertStoreImpl : public CertStore {
private:
friend struct base::DefaultSingletonTraits<CertStoreImpl>;
- RequestTrackerDataMemoizingStore<net::X509Certificate> store_;
+ // Utility structure that allows memoization to be based on the
+ // hash of |cert|'s certificate chain, to avoid needing to compare
+ // every certificate individually. This is purely an optimization.
+ class HashAndCert : public base::RefCountedThreadSafe<HashAndCert> {
+ public:
+ HashAndCert();
+
+ // Comparator for RendererDataMemoizingStore.
+ struct LessThan {
+ bool operator()(const scoped_refptr<HashAndCert>& lhs,
+ const scoped_refptr<HashAndCert>& rhs) const;
+ };
+
+ net::SHA256HashValue chain_hash;
+ scoped_refptr<net::X509Certificate> cert;
+
+ private:
+ friend class base::RefCountedThreadSafe<HashAndCert>;
+
+ ~HashAndCert();
+ };
+ RequestTrackerDataMemoizingStore<HashAndCert> store_;
DISALLOW_COPY_AND_ASSIGN(CertStoreImpl);
};
« no previous file with comments | « ios/web/net/cert_policy.cc ('k') | ios/web/net/cert_store_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698