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

Unified Diff: chromeos/network/onc/onc_certificate_importer.h

Issue 580283005: Revert of Make ONCCertificateImporter async. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@nss_util_deadcode
Patch Set: Created 6 years, 3 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 side-by-side diff with in-line comments
Download patch
Index: chromeos/network/onc/onc_certificate_importer.h
diff --git a/chromeos/network/onc/onc_certificate_importer.h b/chromeos/network/onc/onc_certificate_importer.h
index 5c2678d4f71feb68422c379efdd5819d76248a94..c691f74e823e34382a51dcc9f84218235c25cc08 100644
--- a/chromeos/network/onc/onc_certificate_importer.h
+++ b/chromeos/network/onc/onc_certificate_importer.h
@@ -6,7 +6,6 @@
#define CHROMEOS_NETWORK_ONC_ONC_CERTIFICATE_IMPORTER_H_
#include "base/basictypes.h"
-#include "base/callback_forward.h"
#include "chromeos/chromeos_export.h"
#include "components/onc/onc_constants.h"
#include "net/cert/x509_certificate.h"
@@ -20,25 +19,20 @@
class CHROMEOS_EXPORT CertificateImporter {
public:
- typedef base::Callback<
- void(bool success, const net::CertificateList& onc_trusted_certificates)>
- DoneCallback;
-
CertificateImporter() {}
virtual ~CertificateImporter() {}
- // Import |certificates|, which must be a list of ONC Certificate objects.
- // Certificates are only imported with web trust for user imports. If the
- // "Remove" field of a certificate is enabled, then removes the certificate
- // from the store instead of importing.
- // When the import is completed, |done_callback| will be called with |success|
- // equal to true if all certificates were imported successfully.
- // |onc_trusted_certificates| will contain the list of certificates that
- // were imported and requested the TrustBit "Web".
- // Never calls |done_callback| after this importer is destructed.
- virtual void ImportCertificates(const base::ListValue& certificates,
- ::onc::ONCSource source,
- const DoneCallback& done_callback) = 0;
+ // Import the |certificates|, which must be a list of ONC Certificate objects.
+ // Certificates are only imported with web trust for user imports. If
+ // |onc_trusted_certificates| is not NULL, it will be filled with the list
+ // of certificates that requested the TrustBit "Web". If the "Remove" field of
+ // a certificate is enabled, then removes the certificate from the store
+ // instead of importing. Returns true if all certificates were imported
+ // successfully.
+ virtual bool ImportCertificates(
+ const base::ListValue& certificates,
+ ::onc::ONCSource source,
+ net::CertificateList* onc_trusted_certificates) = 0;
private:
DISALLOW_COPY_AND_ASSIGN(CertificateImporter);
« no previous file with comments | « chromeos/network/onc/mock_certificate_importer.cc ('k') | chromeos/network/onc/onc_certificate_importer_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698