| Index: chrome/common/net/x509_certificate_model_nss.cc
|
| diff --git a/chrome/common/net/x509_certificate_model_nss.cc b/chrome/common/net/x509_certificate_model_nss.cc
|
| index 5f40ce334d3c2c9f0833f268746d16314be5b508..51e2642ccb820b652738b2ca324677b0a60ec7ac 100644
|
| --- a/chrome/common/net/x509_certificate_model_nss.cc
|
| +++ b/chrome/common/net/x509_certificate_model_nss.cc
|
| @@ -100,8 +100,8 @@ using net::X509Certificate;
|
| using std::string;
|
|
|
| string GetCertNameOrNickname(X509Certificate::OSCertHandle cert_handle) {
|
| - string name = ProcessIDN(Stringize(CERT_GetCommonName(&cert_handle->subject),
|
| - ""));
|
| + string name = ProcessIDN(
|
| + Stringize(CERT_GetCommonName(&cert_handle->subject), std::string()));
|
| if (!name.empty())
|
| return name;
|
| return GetNickname(cert_handle);
|
| @@ -132,7 +132,7 @@ string GetVersion(X509Certificate::OSCertHandle cert_handle) {
|
| SEC_ASN1DecodeInteger(&cert_handle->version, &version) == SECSuccess) {
|
| return base::UintToString(version + 1);
|
| }
|
| - return "";
|
| + return std::string();
|
| }
|
|
|
| net::CertType GetType(X509Certificate::OSCertHandle cert_handle) {
|
| @@ -142,7 +142,7 @@ net::CertType GetType(X509Certificate::OSCertHandle cert_handle) {
|
| string GetEmailAddress(X509Certificate::OSCertHandle cert_handle) {
|
| if (cert_handle->emailAddr)
|
| return cert_handle->emailAddr;
|
| - return "";
|
| + return std::string();
|
| }
|
|
|
| void GetUsageStrings(X509Certificate::OSCertHandle cert_handle,
|
| @@ -346,14 +346,14 @@ string GetCMSString(const X509Certificate::OSCertHandles& cert_chain,
|
| message.get(), cert_chain[start], PR_FALSE));
|
| if (!signed_data.get()) {
|
| DLOG(ERROR) << "NSS_CMSSignedData_Create failed";
|
| - return "";
|
| + return std::string();
|
| }
|
| // Add the rest of the chain (if any).
|
| for (size_t i = start + 1; i < end; ++i) {
|
| if (NSS_CMSSignedData_AddCertificate(signed_data.get(), cert_chain[i]) !=
|
| SECSuccess) {
|
| DLOG(ERROR) << "NSS_CMSSignedData_AddCertificate failed on " << i;
|
| - return "";
|
| + return std::string();
|
| }
|
| }
|
|
|
| @@ -363,7 +363,7 @@ string GetCMSString(const X509Certificate::OSCertHandles& cert_chain,
|
| ignore_result(signed_data.release());
|
| } else {
|
| DLOG(ERROR) << "NSS_CMSMessage_GetContentInfo failed";
|
| - return "";
|
| + return std::string();
|
| }
|
|
|
| SECItem cert_p7 = { siBuffer, NULL, 0 };
|
| @@ -373,12 +373,12 @@ string GetCMSString(const X509Certificate::OSCertHandles& cert_chain,
|
| NULL);
|
| if (!ecx) {
|
| DLOG(ERROR) << "NSS_CMSEncoder_Start failed";
|
| - return "";
|
| + return std::string();
|
| }
|
|
|
| if (NSS_CMSEncoder_Finish(ecx) != SECSuccess) {
|
| DLOG(ERROR) << "NSS_CMSEncoder_Finish failed";
|
| - return "";
|
| + return std::string();
|
| }
|
|
|
| return string(reinterpret_cast<const char*>(cert_p7.data), cert_p7.len);
|
|
|