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.
5 #ifndef CHROMEOS_NETWORK_ONC_ONC_CERTIFICATE_IMPORTER_H_
6 #define CHROMEOS_NETWORK_ONC_ONC_CERTIFICATE_IMPORTER_H_
8 #include "base/basictypes.h"
9 #include "chromeos/chromeos_export.h"
10 #include "components/onc/onc_constants.h"
11 #include "net/cert/x509_certificate.h"
20 class CHROMEOS_EXPORT CertificateImporter
{
22 CertificateImporter() {}
23 virtual ~CertificateImporter() {}
25 // Import the |certificates|, which must be a list of ONC Certificate objects.
26 // Certificates are only imported with web trust for user imports. If
27 // |onc_trusted_certificates| is not NULL, it will be filled with the list
28 // of certificates that requested the TrustBit "Web". If the "Remove" field of
29 // a certificate is enabled, then removes the certificate from the store
30 // instead of importing. Returns true if all certificates were imported
32 virtual bool ImportCertificates(
33 const base::ListValue
& certificates
,
34 ::onc::ONCSource source
,
35 net::CertificateList
* onc_trusted_certificates
) = 0;
38 DISALLOW_COPY_AND_ASSIGN(CertificateImporter
);
42 } // namespace chromeos
44 #endif // CHROMEOS_NETWORK_ONC_ONC_CERTIFICATE_IMPORTER_H_