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

Unified Diff: chromeos/network/onc/onc_certificate_importer_impl.cc

Issue 432553003: Remove redundant mapping of net errors to strings. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Response to comments Created 6 years, 4 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: chromeos/network/onc/onc_certificate_importer_impl.cc
diff --git a/chromeos/network/onc/onc_certificate_importer_impl.cc b/chromeos/network/onc/onc_certificate_importer_impl.cc
index 13e4880fe63602769ad8d62e0474bc791913754e..7bb18333aee9a004e67d0be61c7c28c671c06fd1 100644
--- a/chromeos/network/onc/onc_certificate_importer_impl.cc
+++ b/chromeos/network/onc/onc_certificate_importer_impl.cc
@@ -278,9 +278,10 @@ bool CertificateImporterImpl::ParseServerOrCaCertificate(
success = target_nssdb_->ImportCACerts(cert_list, trust, &failures);
if (!failures.empty()) {
+ std::string error_string = net::ErrorToString(failures[0].net_error);
ONC_LOG_ERROR(
base::StringPrintf("Error ( %s ) importing %s certificate",
- net::ErrorToString(failures[0].net_error),
+ error_string.c_str(),
cert_type.c_str()));
return false;
}
@@ -329,9 +330,10 @@ bool CertificateImporterImpl::ParseClientCertificate(
int import_result = target_nssdb_->ImportFromPKCS12(
module.get(), decoded_pkcs12, base::string16(), false, &imported_certs);
if (import_result != net::OK) {
+ std::string error_string = net::ErrorToString(import_result);
ONC_LOG_ERROR(
base::StringPrintf("Unable to import client certificate (error %s)",
- net::ErrorToString(import_result)));
+ error_string.c_str()));
return false;
}
« no previous file with comments | « chrome/test/data/webui/net_internals/test_view.js ('k') | components/cronet/android/org_chromium_net_UrlRequest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698