| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 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_ONC_ONC_CERTIFICATE_IMPORTER_IMPL_H_ | 5 #ifndef CHROMEOS_NETWORK_ONC_ONC_CERTIFICATE_IMPORTER_IMPL_H_ |
| 6 #define CHROMEOS_NETWORK_ONC_ONC_CERTIFICATE_IMPORTER_IMPL_H_ | 6 #define CHROMEOS_NETWORK_ONC_ONC_CERTIFICATE_IMPORTER_IMPL_H_ |
| 7 | 7 |
| 8 #include <map> | 8 #include <map> |
| 9 #include <string> | 9 #include <string> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 43 public: | 43 public: |
| 44 // |io_task_runner| will be used for NSSCertDatabase accesses. | 44 // |io_task_runner| will be used for NSSCertDatabase accesses. |
| 45 CertificateImporterImpl( | 45 CertificateImporterImpl( |
| 46 const scoped_refptr<base::SequencedTaskRunner>& io_task_runner, | 46 const scoped_refptr<base::SequencedTaskRunner>& io_task_runner, |
| 47 net::NSSCertDatabase* target_nssdb_); | 47 net::NSSCertDatabase* target_nssdb_); |
| 48 virtual ~CertificateImporterImpl(); | 48 virtual ~CertificateImporterImpl(); |
| 49 | 49 |
| 50 // CertificateImporter overrides | 50 // CertificateImporter overrides |
| 51 virtual void ImportCertificates(const base::ListValue& certificates, | 51 virtual void ImportCertificates(const base::ListValue& certificates, |
| 52 ::onc::ONCSource source, | 52 ::onc::ONCSource source, |
| 53 const DoneCallback& done_callback) OVERRIDE; | 53 const DoneCallback& done_callback) override; |
| 54 | 54 |
| 55 private: | 55 private: |
| 56 void RunDoneCallback(const CertificateImporter::DoneCallback& callback, | 56 void RunDoneCallback(const CertificateImporter::DoneCallback& callback, |
| 57 bool success, | 57 bool success, |
| 58 const net::CertificateList& onc_trusted_certificates); | 58 const net::CertificateList& onc_trusted_certificates); |
| 59 | 59 |
| 60 // This is the synchronous implementation of ImportCertificates. It is | 60 // This is the synchronous implementation of ImportCertificates. It is |
| 61 // executed on the given |io_task_runner_|. | 61 // executed on the given |io_task_runner_|. |
| 62 static void ParseAndStoreCertificates(::onc::ONCSource source, | 62 static void ParseAndStoreCertificates(::onc::ONCSource source, |
| 63 const DoneCallback& done_callback, | 63 const DoneCallback& done_callback, |
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 107 | 107 |
| 108 base::WeakPtrFactory<CertificateImporterImpl> weak_factory_; | 108 base::WeakPtrFactory<CertificateImporterImpl> weak_factory_; |
| 109 | 109 |
| 110 DISALLOW_COPY_AND_ASSIGN(CertificateImporterImpl); | 110 DISALLOW_COPY_AND_ASSIGN(CertificateImporterImpl); |
| 111 }; | 111 }; |
| 112 | 112 |
| 113 } // namespace onc | 113 } // namespace onc |
| 114 } // namespace chromeos | 114 } // namespace chromeos |
| 115 | 115 |
| 116 #endif // CHROMEOS_NETWORK_ONC_ONC_CERTIFICATE_IMPORTER_IMPL_H_ | 116 #endif // CHROMEOS_NETWORK_ONC_ONC_CERTIFICATE_IMPORTER_IMPL_H_ |
| OLD | NEW |