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 36c26e9b0275c4319785f8d67d6e6c9391f74eb3..85815a83678555b58e707254d3669bc3d0f6f954 100644 |
--- a/chrome/browser/profiles/profile_io_data.cc |
+++ b/chrome/browser/profiles/profile_io_data.cc |
@@ -117,6 +117,8 @@ |
#if defined(OS_CHROMEOS) |
#include "chrome/browser/chromeos/certificate_provider/certificate_provider.h" |
+#include "chrome/browser/chromeos/certificate_provider/certificate_provider_service.h" |
+#include "chrome/browser/chromeos/certificate_provider/certificate_provider_service_factory.h" |
#include "chrome/browser/chromeos/fileapi/external_file_protocol_handler.h" |
#include "chrome/browser/chromeos/login/startup_utils.h" |
#include "chrome/browser/chromeos/net/cert_verify_proc_chromeos.h" |
@@ -453,6 +455,14 @@ void ProfileIOData::InitializeOnUIThread(Profile* profile) { |
policy::USER_AFFILIATION_MANAGED; |
} |
} |
+ |
+ chromeos::CertificateProviderService* cert_provider_service = |
+ chromeos::CertificateProviderServiceFactory::GetForBrowserContext( |
+ profile); |
+ if (cert_provider_service) { |
+ params->certificate_provider = |
+ cert_provider_service->CreateCertificateProvider(); |
+ } |
#endif |
params->profile = profile; |
@@ -940,7 +950,7 @@ ProfileIOData::ResourceContext::CreateClientCertStore() { |
return io_data_->client_cert_store_factory_.Run(); |
#if defined(OS_CHROMEOS) |
return scoped_ptr<net::ClientCertStore>(new chromeos::ClientCertStoreChromeOS( |
- nullptr, // no additional provider |
+ io_data_->certificate_provider_->Copy(), |
make_scoped_ptr(new chromeos::ClientCertFilterChromeOS( |
io_data_->use_system_key_slot(), io_data_->username_hash())), |
base::Bind(&CreateCryptoModuleBlockingPasswordDelegate, |
@@ -1106,6 +1116,8 @@ void ProfileIOData::Init( |
use_system_key_slot_ = profile_params_->use_system_key_slot; |
if (use_system_key_slot_) |
EnableNSSSystemKeySlotForResourceContext(resource_context_.get()); |
+ |
+ certificate_provider_ = profile_params_->certificate_provider.Pass(); |
#endif |
if (g_cert_verifier_for_testing) { |