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

Unified Diff: chrome/browser/profiles/profile_io_data.cc

Issue 1232553003: Add new certificateProvider extension API. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebased. Created 5 years, 3 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
« no previous file with comments | « chrome/browser/profiles/profile_io_data.h ('k') | chrome/chrome_browser_chromeos.gypi » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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) {
« no previous file with comments | « chrome/browser/profiles/profile_io_data.h ('k') | chrome/chrome_browser_chromeos.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698