Chromium Code Reviews| Index: chrome/browser/chromeos/options/cert_library.cc |
| diff --git a/chrome/browser/chromeos/options/cert_library.cc b/chrome/browser/chromeos/options/cert_library.cc |
| index 8c9ac18a9561b38ad70d9c12b469ea89ed4090f0..cb3cb36bf717e58271e4d04e368ba9d6beaf3682 100644 |
| --- a/chrome/browser/chromeos/options/cert_library.cc |
| +++ b/chrome/browser/chromeos/options/cert_library.cc |
| @@ -36,7 +36,8 @@ namespace { |
| // Root CA certificates that are built into Chrome use this token name. |
| const char kRootCertificateTokenName[] = "Builtin Object Token"; |
| -base::string16 GetDisplayString(net::X509Certificate* cert, bool hardware_backed) { |
| +base::string16 GetDisplayString(net::X509Certificate* cert, |
| + bool hardware_backed) { |
| std::string org; |
| if (!cert->subject().organization_names.empty()) |
| org = cert->subject().organization_names[0]; |
| @@ -145,7 +146,7 @@ bool CertLibrary::CertificatesLoaded() const { |
| } |
| bool CertLibrary::IsHardwareBacked() const { |
| - return CertLoader::Get()->IsHardwareBacked(); |
| + return CertLoader::Get()->is_hardware_backed(); |
| } |
| int CertLibrary::NumCertificates(CertType type) const { |
| @@ -170,13 +171,10 @@ std::string CertLibrary::GetCertPkcs11IdAt(CertType type, int index) const { |
| } |
| bool CertLibrary::IsCertHardwareBackedAt(CertType type, int index) const { |
| - if (!CertLoader::Get()->IsHardwareBacked()) |
| + if (!CertLoader::Get()->is_hardware_backed()) |
| return false; |
| net::X509Certificate* cert = GetCertificateAt(type, index); |
| - std::string cert_token_name = |
| - x509_certificate_model::GetTokenName(cert->os_cert_handle()); |
| - return cert_token_name == |
| - CertLoader::Get()->tpm_token_name(); |
| + return CertLoader::Get()->IsCertificateInPrivateSlot(*cert); |
|
mattm
2014/01/23 01:45:55
You could replace both is_hardware_backed and IsCe
tbarzic
2014/01/23 04:45:28
Done.
|
| } |
| int CertLibrary::GetCertIndexByPEM(CertType type, |