OLD | NEW |
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 NET_SSL_CLIENT_KEY_STORE_H_ | 5 #ifndef NET_SSL_CLIENT_KEY_STORE_H_ |
6 #define NET_SSL_CLIENT_KEY_STORE_H_ | 6 #define NET_SSL_CLIENT_KEY_STORE_H_ |
7 | 7 |
8 #include <memory> | 8 #include <memory> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
51 | 51 |
52 void RemoveProvider(const CertKeyProvider* provider); | 52 void RemoveProvider(const CertKeyProvider* provider); |
53 | 53 |
54 // Given a |certificate|'s public key, return the corresponding private | 54 // Given a |certificate|'s public key, return the corresponding private |
55 // key if any of the registered providers has a matching key. | 55 // key if any of the registered providers has a matching key. |
56 // Returns its matching private key on success, nullptr otherwise. | 56 // Returns its matching private key on success, nullptr otherwise. |
57 scoped_refptr<SSLPrivateKey> FetchClientCertPrivateKey( | 57 scoped_refptr<SSLPrivateKey> FetchClientCertPrivateKey( |
58 const X509Certificate& certificate); | 58 const X509Certificate& certificate); |
59 | 59 |
60 private: | 60 private: |
61 friend struct base::DefaultLazyInstanceTraits<ClientKeyStore>; | 61 friend struct base::LazyInstanceTraitsBase<ClientKeyStore>; |
62 | 62 |
63 ClientKeyStore(); | 63 ClientKeyStore(); |
64 ~ClientKeyStore(); | 64 ~ClientKeyStore(); |
65 | 65 |
66 base::Lock lock_; | 66 base::Lock lock_; |
67 std::vector<CertKeyProvider*> providers_; | 67 std::vector<CertKeyProvider*> providers_; |
68 | 68 |
69 DISALLOW_COPY_AND_ASSIGN(ClientKeyStore); | 69 DISALLOW_COPY_AND_ASSIGN(ClientKeyStore); |
70 }; | 70 }; |
71 | 71 |
72 } // namespace net | 72 } // namespace net |
73 | 73 |
74 #endif // NET_SSL_CLIENT_KEY_STORE_H_ | 74 #endif // NET_SSL_CLIENT_KEY_STORE_H_ |
OLD | NEW |