Index: content/browser/certificate_manager_model.cc |
diff --git a/content/browser/certificate_manager_model.cc b/content/browser/certificate_manager_model.cc |
index c1660b63ed5e7a39ec37e0dbd03ac59d617ec602..e7b1daf73cb5fb30038479b5dee5a83bc5bf3d89 100644 |
--- a/content/browser/certificate_manager_model.cc |
+++ b/content/browser/certificate_manager_model.cc |
@@ -7,7 +7,9 @@ |
#include "base/i18n/time_formatting.h" |
#include "base/logging.h" |
#include "base/utf_string_conversions.h" |
+#include "chrome/browser/ui/crypto_module_password_dialog.h" |
#include "chrome/common/net/x509_certificate_model.h" |
+#include "net/base/crypto_module.h" |
#include "net/base/net_errors.h" |
#include "net/base/x509_certificate.h" |
@@ -20,6 +22,19 @@ CertificateManagerModel::~CertificateManagerModel() { |
void CertificateManagerModel::Refresh() { |
VLOG(1) << "refresh started"; |
+ net::CryptoModuleList modules; |
+ cert_db_.ListModules(&modules, false); |
+ VLOG(1) << "refresh waiting for unlocking..."; |
+ browser::UnlockSlotsIfNecessary( |
+ modules, |
+ browser::kCryptoModulePasswordListCerts, |
+ "", // unused. |
+ NewCallback(this, |
+ &CertificateManagerModel::RefreshSlotsUnlocked)); |
+} |
+ |
+void CertificateManagerModel::RefreshSlotsUnlocked() { |
+ VLOG(1) << "refresh listing certs..."; |
cert_db_.ListCerts(&cert_list_); |
observer_->CertificatesRefreshed(); |
VLOG(1) << "refresh finished"; |