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

Unified Diff: chrome/browser/chromeos/policy/user_network_configuration_updater.cc

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: chrome/browser/chromeos/policy/user_network_configuration_updater.cc
diff --git a/chrome/browser/chromeos/policy/user_network_configuration_updater.cc b/chrome/browser/chromeos/policy/user_network_configuration_updater.cc
index 3221bf1074be2be57df59f2d4b2506e6e9023020..447677e70d70c142f7a400b79b8cfc6d40923ef8 100644
--- a/chrome/browser/chromeos/policy/user_network_configuration_updater.cc
+++ b/chrome/browser/chromeos/policy/user_network_configuration_updater.cc
@@ -15,7 +15,6 @@
#include "chromeos/network/managed_network_configuration_handler.h"
#include "chromeos/network/onc/onc_certificate_importer_impl.h"
#include "components/user_manager/user.h"
-#include "content/public/browser/browser_thread.h"
#include "content/public/browser/notification_source.h"
#include "net/cert/x509_certificate.h"
#include "policy/policy_constants.h"
@@ -85,15 +84,6 @@
*certs = web_trust_certs_;
}
-void UserNetworkConfigurationUpdater::OnCertificatesImported(
- bool /* unused success */,
- const net::CertificateList& onc_trusted_certificates) {
- web_trust_certs_.clear();
- if (allow_trusted_certificates_from_policy_)
- web_trust_certs_ = onc_trusted_certificates;
- NotifyTrustAnchorsChanged();
-}
-
void UserNetworkConfigurationUpdater::ImportCertificates(
const base::ListValue& certificates_onc) {
// If certificate importer is not yet set, cache the certificate onc. It will
@@ -103,11 +93,13 @@
return;
}
+ web_trust_certs_.clear();
certificate_importer_->ImportCertificates(
certificates_onc,
onc_source_,
- base::Bind(&UserNetworkConfigurationUpdater::OnCertificatesImported,
- base::Unretained(this)));
+ allow_trusted_certificates_from_policy_ ? &web_trust_certs_ : NULL);
+
+ NotifyTrustAnchorsChanged();
}
void UserNetworkConfigurationUpdater::ApplyNetworkPolicy(
@@ -140,10 +132,7 @@
net::NSSCertDatabase* database) {
DCHECK(database);
SetCertificateImporter(scoped_ptr<chromeos::onc::CertificateImporter>(
- new chromeos::onc::CertificateImporterImpl(
- content::BrowserThread::GetMessageLoopProxyForThread(
- content::BrowserThread::IO),
- database)));
+ new chromeos::onc::CertificateImporterImpl(database)));
}
void UserNetworkConfigurationUpdater::SetCertificateImporter(

Powered by Google App Engine
This is Rietveld 408576698