summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorgspencer@chromium.org <gspencer@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-09-02 00:29:42 +0000
committergspencer@chromium.org <gspencer@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-09-02 00:29:42 +0000
commit31d555a0ef21f57942e49cf10a362c0a8785340b (patch)
tree774fcaa73c7d07cc2e6d1664a3532962ac4d7cc9
parentc161efa6fb7f0220363eaacdc029571e449dde8a (diff)
downloadchromium_src-31d555a0ef21f57942e49cf10a362c0a8785340b.zip
chromium_src-31d555a0ef21f57942e49cf10a362c0a8785340b.tar.gz
chromium_src-31d555a0ef21f57942e49cf10a362c0a8785340b.tar.bz2
Fixing a problem introduced when "Unknown" certs were renamed
to "Other" certs. The rename was apparently not quite finished, so some strings were not found at runtime anymore. This fixes that by finishing the rename of associated strings. (TBR'ing trivial rename of enum) TBR=sky@chromium.org BUG=243471 TEST=Ran on device and verified that dialog now asks the intended question. Review URL: https://chromiumcodereview.appspot.com/23567010 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@220770 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--chrome/app/generated_resources.grd6
-rw-r--r--chrome/browser/resources/options/certificate_manager.html6
-rw-r--r--chrome/browser/ui/webui/options/certificate_manager_handler.cc16
-rw-r--r--chrome/common/net/x509_certificate_model_openssl.cc4
-rw-r--r--chrome/common/net/x509_certificate_model_unittest.cc6
-rw-r--r--chrome/third_party/mozilla_security_manager/nsNSSCertHelper.cpp2
-rw-r--r--chromeos/network/onc/onc_certificate_importer_impl_unittest.cc4
-rw-r--r--net/cert/cert_type.h2
-rw-r--r--net/cert/x509_certificate_nss.cc2
9 files changed, 24 insertions, 24 deletions
diff --git a/chrome/app/generated_resources.grd b/chrome/app/generated_resources.grd
index c08f226..93ab7ba 100644
--- a/chrome/app/generated_resources.grd
+++ b/chrome/app/generated_resources.grd
@@ -3041,7 +3041,7 @@ Public Exponent (<ph name="PUBLIC_EXPONENT_NUM_BITS">$3<ex>24</ex></ph> bits):
<message name="IDS_CERT_MANAGER_CERT_AUTHORITIES_TAB_LABEL" desc="Title of the notebook page displaying certificate authorities">
Authorities
</message>
- <message name="IDS_CERT_MANAGER_UNKNOWN_TAB_LABEL" desc="Title of the notebook page displaying certificates that don't fall under any of the other categories">
+ <message name="IDS_CERT_MANAGER_OTHER_TAB_LABEL" desc="Title of the notebook page displaying certificates that don't fall under any of the other categories">
Others
</message>
<message name="IDS_CERT_MANAGER_USER_TREE_DESCRIPTION" desc="Description label above the tree showing the user's own certificates">
@@ -3053,7 +3053,7 @@ Public Exponent (<ph name="PUBLIC_EXPONENT_NUM_BITS">$3<ex>24</ex></ph> bits):
<message name="IDS_CERT_MANAGER_AUTHORITIES_TREE_DESCRIPTION" desc="Description label above the Certificate Authorities tree">
You have certificates on file that identify these certificate authorities:
</message>
- <message name="IDS_CERT_MANAGER_UNKNOWN_TREE_DESCRIPTION" desc="Description label above the tree showing certificates that don't fall under any of the other categories">
+ <message name="IDS_CERT_MANAGER_OTHER_TREE_DESCRIPTION" desc="Description label above the tree showing certificates that don't fall under any of the other categories">
You have certificates on file that do not fit in any of the other categories:
</message>
<message name="IDS_CERT_MANAGER_VIEW_CERT_BUTTON" desc="Label for the button in the certificate manager which launches the certificate viewer for the selected certificate">
@@ -3089,7 +3089,7 @@ Public Exponent (<ph name="PUBLIC_EXPONENT_NUM_BITS">$3<ex>24</ex></ph> bits):
<message name="IDS_CERT_MANAGER_DELETE_CA_DESCRIPTION" desc="Description of impact of deleting a certification authority certificate">
If you delete a Certification Authority (CA) certificate, your browser will no longer trust any certificates issued by that CA.
</message>
- <message name="IDS_CERT_MANAGER_DELETE_UNKNOWN_FORMAT" desc="Confirmation in certificate manager dialog for deleting a certificate of other type">
+ <message name="IDS_CERT_MANAGER_DELETE_OTHER_FORMAT" desc="Confirmation in certificate manager dialog for deleting a certificate of other type">
Delete certificate "<ph name="CERTIFICATE_NAME">$1<ex>Example Certificate</ex></ph>"?
</message>
<message name="IDS_CERT_MANAGER_EXPORT_PASSWORD_DESC" desc="Description of password prompt in certificate manager for exporting a personal certificate">
diff --git a/chrome/browser/resources/options/certificate_manager.html b/chrome/browser/resources/options/certificate_manager.html
index 70dc773..3d28e7f 100644
--- a/chrome/browser/resources/options/certificate_manager.html
+++ b/chrome/browser/resources/options/certificate_manager.html
@@ -20,8 +20,8 @@
<span class="active-tab-label" i18n-content="caCertsTabTitle"></span>
</span>
<span id="other-certs-nav-tab" class="tab" tab-contents="otherCertsTab">
- <span class="tab-label" i18n-content="unknownCertsTabTitle"></span>
- <span class="active-tab-label" i18n-content="unknownCertsTabTitle">
+ <span class="tab-label" i18n-content="otherCertsTabTitle"></span>
+ <span class="active-tab-label" i18n-content="otherCertsTabTitle">
</span>
</span>
</div>
@@ -114,7 +114,7 @@
<div id="otherCertsTab" class="subpages-tab-contents">
<table class="certificate-tree-table">
<tr><td>
- <span i18n-content="unknownCertsTabDescription"></span>
+ <span i18n-content="otherCertsTabDescription"></span>
</td></tr>
<tr><td>
<tree id="otherCertsTab-tree" class="certificate-tree"
diff --git a/chrome/browser/ui/webui/options/certificate_manager_handler.cc b/chrome/browser/ui/webui/options/certificate_manager_handler.cc
index 8899045..dbabb00 100644
--- a/chrome/browser/ui/webui/options/certificate_manager_handler.cc
+++ b/chrome/browser/ui/webui/options/certificate_manager_handler.cc
@@ -312,8 +312,8 @@ void CertificateManagerHandler::GetLocalizedValues(
l10n_util::GetStringUTF16(IDS_CERT_MANAGER_SERVER_CERTS_TAB_LABEL));
localized_strings->SetString("caCertsTabTitle",
l10n_util::GetStringUTF16(IDS_CERT_MANAGER_CERT_AUTHORITIES_TAB_LABEL));
- localized_strings->SetString("unknownCertsTabTitle",
- l10n_util::GetStringUTF16(IDS_CERT_MANAGER_UNKNOWN_TAB_LABEL));
+ localized_strings->SetString("otherCertsTabTitle",
+ l10n_util::GetStringUTF16(IDS_CERT_MANAGER_OTHER_TAB_LABEL));
// Tab descriptions.
localized_strings->SetString("personalCertsTabDescription",
@@ -322,8 +322,8 @@ void CertificateManagerHandler::GetLocalizedValues(
l10n_util::GetStringUTF16(IDS_CERT_MANAGER_SERVER_TREE_DESCRIPTION));
localized_strings->SetString("caCertsTabDescription",
l10n_util::GetStringUTF16(IDS_CERT_MANAGER_AUTHORITIES_TREE_DESCRIPTION));
- localized_strings->SetString("unknownCertsTabDescription",
- l10n_util::GetStringUTF16(IDS_CERT_MANAGER_UNKNOWN_TREE_DESCRIPTION));
+ localized_strings->SetString("otherCertsTabDescription",
+ l10n_util::GetStringUTF16(IDS_CERT_MANAGER_OTHER_TREE_DESCRIPTION));
// Buttons.
localized_strings->SetString("view_certificate",
@@ -350,9 +350,9 @@ void CertificateManagerHandler::GetLocalizedValues(
l10n_util::GetStringUTF16(IDS_CERT_MANAGER_DELETE_CA_FORMAT));
localized_strings->SetString("caCertsTabDeleteImpact",
l10n_util::GetStringUTF16(IDS_CERT_MANAGER_DELETE_CA_DESCRIPTION));
- localized_strings->SetString("unknownCertsTabDeleteConfirm",
- l10n_util::GetStringUTF16(IDS_CERT_MANAGER_DELETE_UNKNOWN_FORMAT));
- localized_strings->SetString("unknownCertsTabDeleteImpact", std::string());
+ localized_strings->SetString("otherCertsTabDeleteConfirm",
+ l10n_util::GetStringUTF16(IDS_CERT_MANAGER_DELETE_OTHER_FORMAT));
+ localized_strings->SetString("otherCertsTabDeleteImpact", std::string());
// Certificate Restore overlay strings.
localized_strings->SetString("certificateRestorePasswordDescription",
@@ -497,7 +497,7 @@ void CertificateManagerHandler::CertificatesRefreshed() {
PopulateTree("personalCertsTab", net::USER_CERT, web_trusted_certs);
PopulateTree("serverCertsTab", net::SERVER_CERT, web_trusted_certs);
PopulateTree("caCertsTab", net::CA_CERT, web_trusted_certs);
- PopulateTree("otherCertsTab", net::UNKNOWN_CERT, web_trusted_certs);
+ PopulateTree("otherCertsTab", net::OTHER_CERT, web_trusted_certs);
}
void CertificateManagerHandler::FileSelected(const base::FilePath& path,
diff --git a/chrome/common/net/x509_certificate_model_openssl.cc b/chrome/common/net/x509_certificate_model_openssl.cc
index 03d53eb..72dd28d 100644
--- a/chrome/common/net/x509_certificate_model_openssl.cc
+++ b/chrome/common/net/x509_certificate_model_openssl.cc
@@ -37,7 +37,7 @@ std::string GetKeyValuesFromName(X509_NAME* name) {
return ret;
}
-} // namepsace
+} // namespace
namespace x509_certificate_model {
@@ -67,7 +67,7 @@ std::string GetVersion(net::X509Certificate::OSCertHandle cert_handle) {
net::CertType GetType(X509Certificate::OSCertHandle os_cert) {
// TODO(bulach): implement me.
- return net::UNKNOWN_CERT;
+ return net::OTHER_CERT;
}
std::string GetEmailAddress(X509Certificate::OSCertHandle os_cert) {
diff --git a/chrome/common/net/x509_certificate_model_unittest.cc b/chrome/common/net/x509_certificate_model_unittest.cc
index 62bffa7..d625ff28b 100644
--- a/chrome/common/net/x509_certificate_model_unittest.cc
+++ b/chrome/common/net/x509_certificate_model_unittest.cc
@@ -19,7 +19,7 @@ TEST(X509CertificateModelTest, GetTypeCA) {
#if defined(USE_OPENSSL)
// Remove this when OpenSSL build implements the necessary functions.
- EXPECT_EQ(net::UNKNOWN_CERT,
+ EXPECT_EQ(net::OTHER_CERT,
x509_certificate_model::GetType(cert->os_cert_handle()));
#else
EXPECT_EQ(net::CA_CERT,
@@ -43,14 +43,14 @@ TEST(X509CertificateModelTest, GetTypeServer) {
#if defined(USE_OPENSSL)
// Remove this when OpenSSL build implements the necessary functions.
- EXPECT_EQ(net::UNKNOWN_CERT,
+ EXPECT_EQ(net::OTHER_CERT,
x509_certificate_model::GetType(cert->os_cert_handle()));
#else
// Test mozilla_security_manager::GetCertType with server certs and default
// trust. Currently this doesn't work.
// TODO(mattm): make mozilla_security_manager::GetCertType smarter so we can
// tell server certs even if they have no trust bits set.
- EXPECT_EQ(net::UNKNOWN_CERT,
+ EXPECT_EQ(net::OTHER_CERT,
x509_certificate_model::GetType(cert->os_cert_handle()));
net::NSSCertDatabase* cert_db = net::NSSCertDatabase::GetInstance();
diff --git a/chrome/third_party/mozilla_security_manager/nsNSSCertHelper.cpp b/chrome/third_party/mozilla_security_manager/nsNSSCertHelper.cpp
index 11465cc..bcea88e 100644
--- a/chrome/third_party/mozilla_security_manager/nsNSSCertHelper.cpp
+++ b/chrome/third_party/mozilla_security_manager/nsNSSCertHelper.cpp
@@ -1059,7 +1059,7 @@ net::CertType GetCertType(CERTCertificate *cert) {
// TODO(mattm): http://crbug.com/128633.
if (trust.sslFlags & CERTDB_TERMINAL_RECORD)
return net::SERVER_CERT;
- return net::UNKNOWN_CERT;
+ return net::OTHER_CERT;
}
} // namespace mozilla_security_manager
diff --git a/chromeos/network/onc/onc_certificate_importer_impl_unittest.cc b/chromeos/network/onc/onc_certificate_importer_impl_unittest.cc
index 7a525d1..b293a98 100644
--- a/chromeos/network/onc/onc_certificate_importer_impl_unittest.cc
+++ b/chromeos/network/onc/onc_certificate_importer_impl_unittest.cc
@@ -46,12 +46,12 @@ net::CertType GetCertType(net::X509Certificate::OSCertHandle cert) {
// TODO(mattm): http://crbug.com/128633.
if (trust.sslFlags & CERTDB_TERMINAL_RECORD)
return net::SERVER_CERT;
- return net::UNKNOWN_CERT;
+ return net::OTHER_CERT;
}
#else
net::CertType GetCertType(net::X509Certificate::OSCertHandle cert) {
NOTIMPLEMENTED();
- return net::UNKNOWN_CERT;
+ return net::OTHER_CERT;
}
#endif // USE_NSS
diff --git a/net/cert/cert_type.h b/net/cert/cert_type.h
index cb21227..84fc44a 100644
--- a/net/cert/cert_type.h
+++ b/net/cert/cert_type.h
@@ -16,7 +16,7 @@ namespace net {
// UNKNOWN_CERT. If that cert is then trusted with SetCertTrust(cert,
// SERVER_CERT, TRUSTED_SSL), it would become a SERVER_CERT.
enum CertType {
- UNKNOWN_CERT,
+ OTHER_CERT,
CA_CERT,
USER_CERT,
SERVER_CERT,
diff --git a/net/cert/x509_certificate_nss.cc b/net/cert/x509_certificate_nss.cc
index ca25650..9e95413 100644
--- a/net/cert/x509_certificate_nss.cc
+++ b/net/cert/x509_certificate_nss.cc
@@ -106,7 +106,7 @@ std::string X509Certificate::GetDefaultNickname(CertType type) const {
case SERVER_CERT:
result = subject_.GetDisplayName();
break;
- case UNKNOWN_CERT:
+ case OTHER_CERT:
default:
break;
}