OLD | NEW |
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" |
11 #include "base/strings/string_piece.h" | 11 #include "base/strings/string_piece.h" |
12 #include "net/base/net_export.h" | 12 #include "net/base/net_export.h" |
13 #include "net/cert/internal/trust_store.h" | 13 #include "net/cert/internal/trust_store.h" |
14 | 14 |
15 namespace net { | 15 namespace net { |
16 | 16 |
17 namespace der { | |
18 class Input; | |
19 } | |
20 | |
21 // A very simple implementation of a TrustStore, which contains a set of | 17 // A very simple implementation of a TrustStore, which contains a set of |
22 // trust anchors. | 18 // trust anchors. |
23 class NET_EXPORT TrustStoreInMemory : public TrustStore { | 19 class NET_EXPORT TrustStoreInMemory : public TrustStore { |
24 public: | 20 public: |
25 TrustStoreInMemory(); | 21 TrustStoreInMemory(); |
26 ~TrustStoreInMemory() override; | 22 ~TrustStoreInMemory() override; |
27 | 23 |
28 // Empties the trust store, resetting it to original state. | 24 // Empties the trust store, resetting it to original state. |
29 void Clear(); | 25 void Clear(); |
30 | 26 |
(...skipping 12 matching lines...) Expand all Loading... |
43 scoped_refptr<TrustAnchor>, | 39 scoped_refptr<TrustAnchor>, |
44 base::StringPieceHash> | 40 base::StringPieceHash> |
45 anchors_; | 41 anchors_; |
46 | 42 |
47 DISALLOW_COPY_AND_ASSIGN(TrustStoreInMemory); | 43 DISALLOW_COPY_AND_ASSIGN(TrustStoreInMemory); |
48 }; | 44 }; |
49 | 45 |
50 } // namespace net | 46 } // namespace net |
51 | 47 |
52 #endif // NET_CERT_INTERNAL_TRUST_STORE_IN_MEMORY_H_ | 48 #endif // NET_CERT_INTERNAL_TRUST_STORE_IN_MEMORY_H_ |
OLD | NEW |