Index: chrome/browser/profiles/profile_io_data.cc |
diff --git a/chrome/browser/profiles/profile_io_data.cc b/chrome/browser/profiles/profile_io_data.cc |
index 4d8610e44bc8d48cd9087f9409e1e42c346b3748..82afe16cf3876ed0d99807c7a15b0eec67790adc 100644 |
--- a/chrome/browser/profiles/profile_io_data.cc |
+++ b/chrome/browser/profiles/profile_io_data.cc |
@@ -95,6 +95,10 @@ |
#include "chromeos/settings/cros_settings_names.h" |
#endif // defined(OS_CHROMEOS) |
+#if defined(USE_NSS) |
+#include "chrome/browser/ui/crypto_module_password_dialog.h" |
+#endif |
+ |
using content::BrowserContext; |
using content::BrowserThread; |
using content::ResourceContext; |
@@ -677,10 +681,16 @@ net::URLRequestContext* ProfileIOData::ResourceContext::GetRequestContext() { |
} |
scoped_ptr<net::ClientCertStore> |
-ProfileIOData::ResourceContext::CreateClientCertStore() { |
+ProfileIOData::ResourceContext::CreateClientCertStore( |
+ const std::string& host_and_port) { |
#if !defined(USE_OPENSSL) |
- return scoped_ptr<net::ClientCertStore>(new net::ClientCertStoreImpl()); |
-#else |
+ scoped_ptr<net::ClientCertStoreImpl> store(new net::ClientCertStoreImpl()); |
+#if defined(USE_NSS) |
+ store->set_password_delegate(chrome::NewCryptoModuleBlockingDialogDelegate( |
+ chrome::kCryptoModulePasswordClientAuth, host_and_port)); |
+#endif |
+ return store.PassAs<net::ClientCertStore>(); |
+#else // defined(USE_OPENSSL) |
// OpenSSL does not use the ClientCertStore infrastructure. On Android client |
// cert matching is done by the OS as part of the call to show the cert |
// selection dialog. |