Index: chromeos/network/onc/onc_certificate_importer_impl.h |
diff --git a/chromeos/network/onc/onc_certificate_importer_impl.h b/chromeos/network/onc/onc_certificate_importer_impl.h |
index 82db305fb7f0213458847744edc7837eff2051d7..36bc413ae910ad4a5f8c30251c9393697211dea7 100644 |
--- a/chromeos/network/onc/onc_certificate_importer_impl.h |
+++ b/chromeos/network/onc/onc_certificate_importer_impl.h |
@@ -22,6 +22,7 @@ class ListValue; |
} |
namespace net { |
+class NSSCertDatabase; |
class X509Certificate; |
typedef std::vector<scoped_refptr<X509Certificate> > CertificateList; |
} |
@@ -40,7 +41,7 @@ class CHROMEOS_EXPORT CertificateImporterImpl : public CertificateImporter { |
typedef std::map<std::string, scoped_refptr<net::X509Certificate> > |
CertsByGUID; |
- CertificateImporterImpl(); |
+ explicit CertificateImporterImpl(net::NSSCertDatabase* target_nssdb_); |
// CertificateImporter overrides |
virtual bool ImportCertificates( |
@@ -57,15 +58,17 @@ class CHROMEOS_EXPORT CertificateImporterImpl : public CertificateImporter { |
net::CertificateList* onc_trusted_certificates, |
CertsByGUID* imported_server_and_ca_certs); |
+ private: |
// Lists the certificates that have the string |label| as their certificate |
// nickname (exact match). |
static void ListCertsWithNickname(const std::string& label, |
- net::CertificateList* result); |
+ net::CertificateList* result, |
+ net::NSSCertDatabase* target_nssdb); |
- private: |
// Deletes any certificate that has the string |label| as its nickname (exact |
// match). |
- static bool DeleteCertAndKeyByNickname(const std::string& label); |
+ static bool DeleteCertAndKeyByNickname(const std::string& label, |
+ net::NSSCertDatabase* target_nssdb); |
// Parses and stores/removes |certificate| in/from the certificate |
// store. Returns true if the operation succeeded. |
@@ -90,6 +93,9 @@ class CHROMEOS_EXPORT CertificateImporterImpl : public CertificateImporter { |
bool ParseClientCertificate(const std::string& guid, |
const base::DictionaryValue& certificate); |
+ // The certificate database to which certificates are imported. |
+ net::NSSCertDatabase* target_nssdb_; |
+ |
DISALLOW_COPY_AND_ASSIGN(CertificateImporterImpl); |
}; |