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

Side by Side 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 unified diff | 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 »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 IOS_WEB_NET_CERT_STORE_IMPL_H_ 5 #ifndef IOS_WEB_NET_CERT_STORE_IMPL_H_
6 #define IOS_WEB_NET_CERT_STORE_IMPL_H_ 6 #define IOS_WEB_NET_CERT_STORE_IMPL_H_
7 7
8 #include "base/macros.h" 8 #include "base/macros.h"
9 #include "base/memory/singleton.h" 9 #include "base/memory/singleton.h"
10 #include "ios/web/net/request_tracker_data_memoizing_store.h" 10 #include "ios/web/net/request_tracker_data_memoizing_store.h"
(...skipping 13 matching lines...) Expand all
24 scoped_refptr<net::X509Certificate>* cert) override; 24 scoped_refptr<net::X509Certificate>* cert) override;
25 void RemoveCertsForGroup(int group_id) override; 25 void RemoveCertsForGroup(int group_id) override;
26 26
27 protected: 27 protected:
28 CertStoreImpl(); 28 CertStoreImpl();
29 ~CertStoreImpl() override; 29 ~CertStoreImpl() override;
30 30
31 private: 31 private:
32 friend struct base::DefaultSingletonTraits<CertStoreImpl>; 32 friend struct base::DefaultSingletonTraits<CertStoreImpl>;
33 33
34 RequestTrackerDataMemoizingStore<net::X509Certificate> store_; 34 // Utility structure that allows memoization to be based on the
35 // hash of |cert|'s certificate chain, to avoid needing to compare
36 // every certificate individually. This is purely an optimization.
37 class HashAndCert : public base::RefCountedThreadSafe<HashAndCert> {
38 public:
39 HashAndCert();
40
41 // Comparator for RendererDataMemoizingStore.
42 struct LessThan {
43 bool operator()(const scoped_refptr<HashAndCert>& lhs,
44 const scoped_refptr<HashAndCert>& rhs) const;
45 };
46
47 net::SHA256HashValue chain_hash;
48 scoped_refptr<net::X509Certificate> cert;
49
50 private:
51 friend class base::RefCountedThreadSafe<HashAndCert>;
52
53 ~HashAndCert();
54 };
55 RequestTrackerDataMemoizingStore<HashAndCert> store_;
35 56
36 DISALLOW_COPY_AND_ASSIGN(CertStoreImpl); 57 DISALLOW_COPY_AND_ASSIGN(CertStoreImpl);
37 }; 58 };
38 59
39 } // namespace web 60 } // namespace web
40 61
41 #endif // IOS_WEB_NET_CERT_STORE_IMPL_H_ 62 #endif // IOS_WEB_NET_CERT_STORE_IMPL_H_
OLDNEW
« 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