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

Side by Side Diff: net/cert/internal/trust_store_in_memory.h

Issue 2272493002: Add TrustStoreNSS and TrustStoreCollection (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@cert-trust-store-interface3-nss
Patch Set: rebase Created 4 years, 3 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
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_INTERNAL_TRUST_STORE_IN_MEMORY_H_ 5 #ifndef NET_CERT_INTERNAL_TRUST_STORE_IN_MEMORY_H_
6 #define NET_CERT_INTERNAL_TRUST_STORE_IN_MEMORY_H_ 6 #define NET_CERT_INTERNAL_TRUST_STORE_IN_MEMORY_H_
7 7
8 #include <unordered_map> 8 #include <unordered_map>
9 9
10 #include "base/memory/ref_counted.h" 10 #include "base/memory/ref_counted.h"
(...skipping 14 matching lines...) Expand all
25 TrustStoreInMemory(); 25 TrustStoreInMemory();
26 ~TrustStoreInMemory() override; 26 ~TrustStoreInMemory() override;
27 27
28 // Empties the trust store, resetting it to original state. 28 // Empties the trust store, resetting it to original state.
29 void Clear(); 29 void Clear();
30 30
31 void AddTrustAnchor(scoped_refptr<TrustAnchor> anchor); 31 void AddTrustAnchor(scoped_refptr<TrustAnchor> anchor);
32 32
33 // TrustStore implementation: 33 // TrustStore implementation:
34 void FindTrustAnchorsForCert( 34 void FindTrustAnchorsForCert(
35 const ParsedCertificate* cert, 35 const scoped_refptr<ParsedCertificate>& cert,
36 const TrustAnchorsCallback& callback, 36 const TrustAnchorsCallback& callback,
37 TrustAnchors* synchronous_matches, 37 TrustAnchors* synchronous_matches,
38 std::unique_ptr<Request>* out_req) const override; 38 std::unique_ptr<Request>* out_req) const override;
39 39
40 private: 40 private:
41 // Multimap from normalized subject -> TrustAnchor. 41 // Multimap from normalized subject -> TrustAnchor.
42 std::unordered_multimap<base::StringPiece, 42 std::unordered_multimap<base::StringPiece,
43 scoped_refptr<TrustAnchor>, 43 scoped_refptr<TrustAnchor>,
44 base::StringPieceHash> 44 base::StringPieceHash>
45 anchors_; 45 anchors_;
46 46
47 DISALLOW_COPY_AND_ASSIGN(TrustStoreInMemory); 47 DISALLOW_COPY_AND_ASSIGN(TrustStoreInMemory);
48 }; 48 };
49 49
50 } // namespace net 50 } // namespace net
51 51
52 #endif // NET_CERT_INTERNAL_TRUST_STORE_IN_MEMORY_H_ 52 #endif // NET_CERT_INTERNAL_TRUST_STORE_IN_MEMORY_H_
OLDNEW
« no previous file with comments | « net/cert/internal/trust_store_collection_unittest.cc ('k') | net/cert/internal/trust_store_in_memory.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698