Chromium Code Reviews| Index: chrome/browser/certificate_manager_model.cc |
| diff --git a/chrome/browser/certificate_manager_model.cc b/chrome/browser/certificate_manager_model.cc |
| index be4a21f34759e82e8d97b36547b38a0802b99827..8f5518ace0c0e0eb6ce7f2d95b9a8efffe467867 100644 |
| --- a/chrome/browser/certificate_manager_model.cc |
| +++ b/chrome/browser/certificate_manager_model.cc |
| @@ -14,6 +14,15 @@ |
| #include "net/base/net_errors.h" |
| #include "net/base/x509_certificate.h" |
| +#if defined(OS_CHROMEOS) |
| +#include <pk11pub.h> |
| + |
| +#include "crypto/nss_util.h" |
| +#include "grit/generated_resources.h" |
| +#include "net/base/x509_certificate.h" |
| +#include "ui/base/l10n/l10n_util.h" |
| +#endif |
| + |
| CertificateManagerModel::CertificateManagerModel(Observer* observer) |
| : observer_(observer) { |
| } |
| @@ -70,6 +79,23 @@ string16 CertificateManagerModel::GetColumnText( |
| case COL_SUBJECT_NAME: |
| rv = UTF8ToUTF16( |
| x509_certificate_model::GetCertNameOrNickname(cert.os_cert_handle())); |
| + |
| +#if defined(OS_CHROMEOS) |
| + // TODO(xiyuan): Put this into a column when we have js tree-table. |
| + if (crypto::IsTPMTokenReady()) { |
| + std::string tpm_token_name; |
| + std::string user_pin; |
| + crypto::GetTPMTokenInfo(&tpm_token_name, &user_pin); |
| + |
| + PK11SlotInfo* cert_slot = cert.os_cert_handle()->slot; |
| + if (cert_slot && PK11_GetTokenName(cert_slot) == tpm_token_name) { |
|
mattm
2011/06/04 02:00:32
If we want to do it by comparing the name, it coul
xiyuan
2011/06/06 17:17:17
This is what I want to hear. I'd like to compare h
|
| + rv = l10n_util::GetStringFUTF16( |
| + IDS_CERT_MANAGER_HARDWARE_BACKED_KEY_FORMAT, |
| + rv, |
| + l10n_util::GetStringUTF16(IDS_CERT_MANAGER_HARDWARE_BACKED)); |
| + } |
| + } |
| +#endif |
| break; |
| case COL_CERTIFICATE_STORE: |
| rv = UTF8ToUTF16( |