| 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 |
| 11 #include "base/callback.h" | 11 #include "base/callback.h" |
| 12 #include "base/lazy_instance.h" | 12 #include "base/lazy_instance.h" |
| 13 #include "base/macros.h" | 13 #include "base/macros.h" |
| 14 #include "base/synchronization/lock.h" | 14 #include "base/synchronization/lock.h" |
| 15 #include "net/base/net_export.h" | 15 #include "net/base/net_export.h" |
| 16 | 16 |
| 17 namespace net { | 17 namespace net { |
| 18 | 18 |
| 19 class SSLPrivateKey; | 19 class SSLPrivateKey; |
| 20 class X509Certificate; | 20 class X509Certificate; |
| 21 | 21 |
| 22 // TODO(mattm): This ends up still being used due to the platformKeys api. Move |
| 23 // it under chrome/browser/chromeos/net or remove it and call |
| 24 // CertificateProviderService directly? |
| 22 // TODO(rsleevi, davidben): Remove this once https://crbug.com/394131 is fixed. | 25 // TODO(rsleevi, davidben): Remove this once https://crbug.com/394131 is fixed. |
| 23 // A certificate and key store that allows several external certificate | 26 // A certificate and key store that allows several external certificate |
| 24 // providers to expose certificates and keys through this store. All currently | 27 // providers to expose certificates and keys through this store. All currently |
| 25 // provided certificates will be accessible through |FetchClientCertPrivateKey|. | 28 // provided certificates will be accessible through |FetchClientCertPrivateKey|. |
| 26 // Methods of this singleton can be called from any thread. | 29 // Methods of this singleton can be called from any thread. |
| 27 class NET_EXPORT ClientKeyStore { | 30 class NET_EXPORT ClientKeyStore { |
| 28 public: | 31 public: |
| 29 class CertKeyProvider { | 32 class CertKeyProvider { |
| 30 public: | 33 public: |
| 31 // This can be called from any thread. | 34 // This can be called from any thread. |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 65 | 68 |
| 66 base::Lock lock_; | 69 base::Lock lock_; |
| 67 std::vector<CertKeyProvider*> providers_; | 70 std::vector<CertKeyProvider*> providers_; |
| 68 | 71 |
| 69 DISALLOW_COPY_AND_ASSIGN(ClientKeyStore); | 72 DISALLOW_COPY_AND_ASSIGN(ClientKeyStore); |
| 70 }; | 73 }; |
| 71 | 74 |
| 72 } // namespace net | 75 } // namespace net |
| 73 | 76 |
| 74 #endif // NET_SSL_CLIENT_KEY_STORE_H_ | 77 #endif // NET_SSL_CLIENT_KEY_STORE_H_ |
| OLD | NEW |