| Index: chromeos/network/certificate_handler.h
|
| diff --git a/chromeos/network/certificate_handler.h b/chromeos/network/certificate_handler.h
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..ec706e727a17ee80ce8f0f85dd1b2d3d70234631
|
| --- /dev/null
|
| +++ b/chromeos/network/certificate_handler.h
|
| @@ -0,0 +1,50 @@
|
| +// Copyright (c) 2013 The Chromium Authors. All rights reserved.
|
| +// Use of this source code is governed by a BSD-style license that can be
|
| +// found in the LICENSE file.
|
| +
|
| +#ifndef CHROMEOS_NETWORK_CERTIFICATE_HANDLER_H_
|
| +#define CHROMEOS_NETWORK_CERTIFICATE_HANDLER_H_
|
| +
|
| +#include "chromeos/chromeos_export.h"
|
| +#include "chromeos/network/onc/onc_constants.h"
|
| +#include "net/cert/x509_certificate.h"
|
| +
|
| +namespace base {
|
| +class ListValue;
|
| +}
|
| +
|
| +namespace chromeos {
|
| +
|
| +class CHROMEOS_EXPORT CertificateHandler {
|
| + public:
|
| + CertificateHandler();
|
| + virtual ~CertificateHandler();
|
| +
|
| + // Initializes the singleton.
|
| + static void Initialize();
|
| +
|
| + // Returns if the singleton is initialized.
|
| + static bool IsInitialized();
|
| +
|
| + // Destroys the singleton.
|
| + static void Shutdown();
|
| +
|
| + // Initialize() must be called before this.
|
| + static CertificateHandler* Get();
|
| +
|
| + // Import the |certificates|, which must be a list of ONC Certificate objects.
|
| + // If |onc_trusted_certificates| is not NULL, it will be filled with the list
|
| + // of certificates that requested the TrustBit "Web". Returns true if all
|
| + // certificates were imported successfully.
|
| + virtual bool ImportCertificates(
|
| + const base::ListValue& certificates,
|
| + onc::ONCSource source,
|
| + net::CertificateList* onc_trusted_certificates);
|
| +
|
| + private:
|
| + DISALLOW_COPY_AND_ASSIGN(CertificateHandler);
|
| +};
|
| +
|
| +} // namespace chromeos
|
| +
|
| +#endif // CHROMEOS_NETWORK_CERTIFICATE_HANDLER_H_
|
|
|