OLD | NEW |
---|---|
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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 CHROMEOS_NETWORK_CERTIFICATE_HANDLER_H_ | 5 #ifndef CHROMEOS_NETWORK_CERTIFICATE_HANDLER_H_ |
6 #define CHROMEOS_NETWORK_CERTIFICATE_HANDLER_H_ | 6 #define CHROMEOS_NETWORK_CERTIFICATE_HANDLER_H_ |
7 | 7 |
8 #include <map> | |
9 | |
8 #include "chromeos/chromeos_export.h" | 10 #include "chromeos/chromeos_export.h" |
9 #include "chromeos/network/onc/onc_constants.h" | 11 #include "chromeos/network/onc/onc_constants.h" |
10 #include "net/cert/x509_certificate.h" | 12 #include "net/cert/x509_certificate.h" |
11 | 13 |
12 namespace base { | 14 namespace base { |
13 class ListValue; | 15 class ListValue; |
14 } | 16 } |
15 | 17 |
16 namespace chromeos { | 18 namespace chromeos { |
17 | 19 |
18 class CHROMEOS_EXPORT CertificateHandler { | 20 class CHROMEOS_EXPORT CertificateHandler { |
19 public: | 21 public: |
22 typedef std::map<std::string, scoped_refptr<net::X509Certificate> > | |
23 CertsByGUID; | |
24 | |
20 CertificateHandler(); | 25 CertificateHandler(); |
21 virtual ~CertificateHandler(); | 26 virtual ~CertificateHandler(); |
22 | 27 |
23 // Import the |certificates|, which must be a list of ONC Certificate objects. | 28 // Import the |certificates|, which must be a list of ONC Certificate objects. |
24 // If |onc_trusted_certificates| is not NULL, it will be filled with the list | 29 // If |onc_trusted_certificates| is not NULL, it will be filled with the list |
25 // of certificates that requested the TrustBit "Web". Returns true if all | 30 // of certificates that requested the TrustBit "Web". Returns true if all |
26 // certificates were imported successfully. | 31 // certificates were imported successfully. |
Greg Spencer (Chromium)
2013/06/27 20:15:47
Add a description of |imported_server_and_ca_certs
pneubeck (no reviews)
2013/06/28 09:41:03
Done.
| |
27 virtual bool ImportCertificates( | 32 virtual bool ImportCertificates( |
28 const base::ListValue& certificates, | 33 const base::ListValue& certificates, |
29 onc::ONCSource source, | 34 onc::ONCSource source, |
30 net::CertificateList* onc_trusted_certificates); | 35 net::CertificateList* onc_trusted_certificates, |
36 CertsByGUID* imported_server_and_ca_certs); | |
31 | 37 |
32 private: | 38 private: |
33 DISALLOW_COPY_AND_ASSIGN(CertificateHandler); | 39 DISALLOW_COPY_AND_ASSIGN(CertificateHandler); |
34 }; | 40 }; |
35 | 41 |
36 } // namespace chromeos | 42 } // namespace chromeos |
37 | 43 |
38 #endif // CHROMEOS_NETWORK_CERTIFICATE_HANDLER_H_ | 44 #endif // CHROMEOS_NETWORK_CERTIFICATE_HANDLER_H_ |
OLD | NEW |