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

Unified Diff: chrome/browser/ui/gtk/ssl_client_certificate_selector.cc

Issue 61643007: Update keygen to use correct NSS slot on ChromeOS multiprofile. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: jam review changes Created 7 years 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/gtk/ssl_client_certificate_selector.cc
diff --git a/chrome/browser/ui/gtk/ssl_client_certificate_selector.cc b/chrome/browser/ui/gtk/ssl_client_certificate_selector.cc
index faced7b6bd01af6c0347f12523648c09377cad45..99cfba727235a49a0340ebb49159e0f969e60708 100644
--- a/chrome/browser/ui/gtk/ssl_client_certificate_selector.cc
+++ b/chrome/browser/ui/gtk/ssl_client_certificate_selector.cc
@@ -15,7 +15,7 @@
#include "base/strings/utf_string_conversions.h"
#include "chrome/browser/certificate_viewer.h"
#include "chrome/browser/ssl/ssl_client_auth_observer.h"
-#include "chrome/browser/ui/crypto_module_password_dialog.h"
+#include "chrome/browser/ui/crypto_module_password_dialog_nss.h"
#include "chrome/browser/ui/gtk/constrained_window_gtk.h"
#include "chrome/browser/ui/gtk/gtk_util.h"
#include "chrome/common/net/x509_certificate_model.h"
@@ -350,14 +350,15 @@ void SSLClientCertificateSelector::OnCancelClicked(GtkWidget* button) {
}
void SSLClientCertificateSelector::OnOkClicked(GtkWidget* button) {
- net::X509Certificate* cert = GetSelectedCert();
-
// Remove the observer before we try unlocking, otherwise we might act on a
// notification while waiting for the unlock dialog, causing us to delete
// ourself before the Unlocked callback gets called.
StopObserving();
+#if defined(USE_NSS)
GtkWidget* toplevel = gtk_widget_get_toplevel(root_widget_.get());
+ net::X509Certificate* cert = GetSelectedCert();
+
chrome::UnlockCertSlotIfNecessary(
cert,
chrome::kCryptoModulePasswordClientAuth,
@@ -365,6 +366,9 @@ void SSLClientCertificateSelector::OnOkClicked(GtkWidget* button) {
GTK_WINDOW(toplevel),
base::Bind(&SSLClientCertificateSelector::Unlocked,
base::Unretained(this)));
+#else
+ Unlocked();
+#endif
}
void SSLClientCertificateSelector::OnPromptShown(GtkWidget* widget,

Powered by Google App Engine
This is Rietveld 408576698