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

Unified Diff: chrome/browser/chromeos/certificate_provider/certificate_provider_service.cc

Issue 1330003002: CertificateProviderService: Expose certificate lookup. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@scoped_ptr_map
Patch Set: 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
Index: chrome/browser/chromeos/certificate_provider/certificate_provider_service.cc
diff --git a/chrome/browser/chromeos/certificate_provider/certificate_provider_service.cc b/chrome/browser/chromeos/certificate_provider/certificate_provider_service.cc
index da19c82e8540c127f5d652fe4c32a1752626ff2e..ef0081b23fcaf8bc8614c1a73b441a2b0b9705aa 100644
--- a/chrome/browser/chromeos/certificate_provider/certificate_provider_service.cc
+++ b/chrome/browser/chromeos/certificate_provider/certificate_provider_service.cc
@@ -151,9 +151,12 @@ CertificateProviderService::CertKeyProviderImpl::~CertKeyProviderImpl() {}
bool CertificateProviderService::CertKeyProviderImpl::GetCertificateKey(
const net::X509Certificate& cert,
scoped_ptr<net::SSLPrivateKey>* private_key) {
+ bool is_currently_provided = false;
CertificateInfo info;
std::string extension_id;
- if (!certificate_map_->LookUpCertificate(cert, &info, &extension_id))
+ certificate_map_->LookUpCertificate(cert, &is_currently_provided, &info,
+ &extension_id);
+ if (!is_currently_provided)
return false;
private_key->reset(
@@ -350,6 +353,17 @@ void CertificateProviderService::ReplyToSignRequest(
callback.Run(error_code, signature);
}
+bool CertificateProviderService::LookUpCertificate(
+ const net::X509Certificate& cert,
+ bool* has_extension,
+ std::string* extension_id) {
+ DCHECK(thread_checker_.CalledOnValidThread());
+
+ CertificateInfo unused_info;
+ return certificate_map_.LookUpCertificate(cert, has_extension, &unused_info,
+ extension_id);
+}
+
scoped_ptr<CertificateProvider>
CertificateProviderService::CreateCertificateProvider() {
DCHECK(thread_checker_.CalledOnValidThread());

Powered by Google App Engine
This is Rietveld 408576698