| OLD | NEW |
| (Empty) |
| 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 | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #ifndef CHROMEOS_NETWORK_CERTIFICATE_HANDLER_H_ | |
| 6 #define CHROMEOS_NETWORK_CERTIFICATE_HANDLER_H_ | |
| 7 | |
| 8 #include "base/memory/ref_counted.h" | |
| 9 #include "chromeos/chromeos_export.h" | |
| 10 #include "chromeos/network/onc/onc_constants.h" | |
| 11 #include "net/cert/x509_certificate.h" | |
| 12 | |
| 13 namespace base { | |
| 14 class ListValue; | |
| 15 } | |
| 16 | |
| 17 namespace chromeos { | |
| 18 | |
| 19 class CHROMEOS_EXPORT CertificateHandler { | |
| 20 public: | |
| 21 CertificateHandler(); | |
| 22 virtual ~CertificateHandler(); | |
| 23 | |
| 24 // Import the |certificates|, which must be a list of ONC Certificate objects. | |
| 25 // If |onc_trusted_certificates| is not NULL, it will be filled with the list | |
| 26 // of certificates that requested the TrustBit "Web". If | |
| 27 // |imported_server_and_ca_certs| is not null, it will be filled with the | |
| 28 // (GUID, Certificate) pairs of all successfully imported Server and CA | |
| 29 // certificates. Returns true if all certificates were imported successfully. | |
| 30 virtual bool ImportCertificates( | |
| 31 const base::ListValue& certificates, | |
| 32 onc::ONCSource source, | |
| 33 net::CertificateList* onc_trusted_certificates); | |
| 34 | |
| 35 private: | |
| 36 DISALLOW_COPY_AND_ASSIGN(CertificateHandler); | |
| 37 }; | |
| 38 | |
| 39 } // namespace chromeos | |
| 40 | |
| 41 #endif // CHROMEOS_NETWORK_CERTIFICATE_HANDLER_H_ | |
| OLD | NEW |