Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(125)

Side by Side Diff: chromeos/network/onc/onc_certificate_importer.h

Issue 148183013: Use per-user nssdb in onc certificate importer (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 6 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 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 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_H_ 5 #ifndef CHROMEOS_NETWORK_ONC_ONC_CERTIFICATE_IMPORTER_H_
6 #define CHROMEOS_NETWORK_ONC_ONC_CERTIFICATE_IMPORTER_H_ 6 #define CHROMEOS_NETWORK_ONC_ONC_CERTIFICATE_IMPORTER_H_
7 7
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 #include "chromeos/chromeos_export.h" 9 #include "chromeos/chromeos_export.h"
10 #include "components/onc/onc_constants.h" 10 #include "components/onc/onc_constants.h"
11 #include "net/cert/x509_certificate.h" 11 #include "net/cert/x509_certificate.h"
12 12
13 namespace base { 13 namespace base {
14 class ListValue; 14 class ListValue;
15 } 15 }
16 16
17 namespace net {
18 class NSSCertDatabase;
19 }
20
17 namespace chromeos { 21 namespace chromeos {
18 namespace onc { 22 namespace onc {
19 23
20 class CHROMEOS_EXPORT CertificateImporter { 24 class CHROMEOS_EXPORT CertificateImporter {
21 public: 25 public:
22 CertificateImporter() {} 26 CertificateImporter() {}
23 virtual ~CertificateImporter() {} 27 virtual ~CertificateImporter() {}
24 28
25 // Import the |certificates|, which must be a list of ONC Certificate objects. 29 // Import the |certificates|, which must be a list of ONC Certificate objects.
26 // Certificates are only imported with web trust for user imports. If 30 // 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 31 // |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 32 // of certificates that requested the TrustBit "Web". If the "Remove" field of
29 // a certificate is enabled, then removes the certificate from the store 33 // a certificate is enabled, then removes the certificate from the store
30 // instead of importing. Returns true if all certificates were imported 34 // instead of importing. Returns true if all certificates were imported
31 // successfully. 35 // successfully.
32 virtual bool ImportCertificates( 36 virtual bool ImportCertificates(
33 const base::ListValue& certificates, 37 const base::ListValue& certificates,
34 ::onc::ONCSource source, 38 ::onc::ONCSource source,
39 net::NSSCertDatabase* target_nssdb,
35 net::CertificateList* onc_trusted_certificates) = 0; 40 net::CertificateList* onc_trusted_certificates) = 0;
36 41
37 private: 42 private:
38 DISALLOW_COPY_AND_ASSIGN(CertificateImporter); 43 DISALLOW_COPY_AND_ASSIGN(CertificateImporter);
39 }; 44 };
40 45
41 } // namespace onc 46 } // namespace onc
42 } // namespace chromeos 47 } // namespace chromeos
43 48
44 #endif // CHROMEOS_NETWORK_ONC_ONC_CERTIFICATE_IMPORTER_H_ 49 #endif // CHROMEOS_NETWORK_ONC_ONC_CERTIFICATE_IMPORTER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698