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

Unified Diff: chrome/browser/ui/webui/options/certificate_manager_handler.cc

Issue 6580058: NSS: Unlock crypto devices when populating cert manager. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: review changes Created 9 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/webui/options/certificate_manager_handler.cc
diff --git a/chrome/browser/ui/webui/options/certificate_manager_handler.cc b/chrome/browser/ui/webui/options/certificate_manager_handler.cc
index bfc730d652e15f06bbffeda23e00c2cbcd612499..f641d343849a70b42b2c228c47b749c653c84460 100644
--- a/chrome/browser/ui/webui/options/certificate_manager_handler.cc
+++ b/chrome/browser/ui/webui/options/certificate_manager_handler.cc
@@ -540,7 +540,8 @@ void CertificateManagerHandler::ExportPersonalPasswordSelected(
}
// Currently, we don't support exporting more than one at a time. If we do,
- // this would need some cleanup to handle unlocking multiple slots.
+ // this would need to either change this to use UnlockSlotsIfNecessary or
+ // change UnlockCertSlotIfNecessary to take a CertificateList.
DCHECK_EQ(selected_cert_list_.size(), 1U);
// TODO(mattm): do something smarter about non-extractable keys
@@ -637,8 +638,10 @@ void CertificateManagerHandler::ImportPersonalFileRead(
// TODO(mattm): allow user to choose a slot to import to.
module_ = certificate_manager_model_->cert_db().GetDefaultModule();
- browser::UnlockSlotIfNecessary(
- module_.get(),
+ net::CryptoModuleList modules;
+ modules.push_back(module_);
+ browser::UnlockSlotsIfNecessary(
+ modules,
browser::kCryptoModulePasswordCertImport,
"", // unused.
NewCallback(this,

Powered by Google App Engine
This is Rietveld 408576698