 Chromium Code Reviews
 Chromium Code Reviews Issue 2000503002:
  Remove the fingerprint and ca_fingerprint from X509Certificate  (Closed) 
  Base URL: https://chromium.googlesource.com/chromium/src.git@move_cache
    
  
    Issue 2000503002:
  Remove the fingerprint and ca_fingerprint from X509Certificate  (Closed) 
  Base URL: https://chromium.googlesource.com/chromium/src.git@move_cache| Index: content/browser/cert_store_impl.h | 
| diff --git a/content/browser/cert_store_impl.h b/content/browser/cert_store_impl.h | 
| index 2b08c52c802cb03ddf718ec714cb46ee54a2b33f..05629f6eeec4639c2fc6619cb3b6a191522a8c8c 100644 | 
| --- a/content/browser/cert_store_impl.h | 
| +++ b/content/browser/cert_store_impl.h | 
| @@ -6,9 +6,11 @@ | 
| #define CONTENT_BROWSER_CERT_STORE_IMPL_H_ | 
| #include "base/macros.h" | 
| +#include "base/memory/ref_counted.h" | 
| #include "base/memory/singleton.h" | 
| #include "content/browser/renderer_data_memoizing_store.h" | 
| #include "content/public/browser/cert_store.h" | 
| +#include "net/base/hash_value.h" | 
| #include "net/cert/x509_certificate.h" | 
| namespace content { | 
| @@ -31,7 +33,28 @@ class CertStoreImpl : public CertStore { | 
| private: | 
| friend struct base::DefaultSingletonTraits<CertStoreImpl>; | 
| - RendererDataMemoizingStore<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(); | 
| + }; | 
| 
jochen (gone - plz use gerrit)
2016/06/16 22:32:16
disallow copy & assign?
 | 
| + RendererDataMemoizingStore<HashAndCert> store_; | 
| DISALLOW_COPY_AND_ASSIGN(CertStoreImpl); | 
| }; |