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

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

Issue 14876021: Re-factor network_event_log (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address final nits Created 7 years, 7 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
« no previous file with comments | « chromeos/network/network_state_handler_unittest.cc ('k') | chromeos/network/shill_property_handler.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chromeos/network/onc/onc_certificate_importer.cc
diff --git a/chromeos/network/onc/onc_certificate_importer.cc b/chromeos/network/onc/onc_certificate_importer.cc
index 266250fd1b0bd99284721b1f97010bd0f6c6416f..fe8e66b8255e342a6f128ae78a885f4dc265ae49 100644
--- a/chromeos/network/onc/onc_certificate_importer.cc
+++ b/chromeos/network/onc/onc_certificate_importer.cc
@@ -19,8 +19,10 @@
#include "net/cert/pem_tokenizer.h"
#include "net/cert/x509_certificate.h"
-#define ONC_LOG_WARNING(message) NET_LOG_WARNING("ONC", message)
-#define ONC_LOG_ERROR(message) NET_LOG_ERROR("ONC", message)
+#define ONC_LOG_WARNING(message) \
+ NET_LOG_DEBUG("ONC Certificate Import Warning", message)
+#define ONC_LOG_ERROR(message) \
+ NET_LOG_ERROR("ONC Certificate Import Error", message)
namespace {
@@ -297,8 +299,9 @@ bool CertificateImporter::ParseServerOrCaCertificate(
}
if (!failures.empty()) {
- ONC_LOG_ERROR("Error (" + net::ErrorToString(failures[0].net_error) +
- ") importing " + cert_type + " certificate");
+ ONC_LOG_ERROR(base::StringPrintf("Error ( %s ) importing %s certificate",
+ net::ErrorToString(failures[0].net_error),
+ cert_type.c_str()));
return false;
}
if (!success) {
@@ -338,8 +341,9 @@ bool CertificateImporter::ParseClientCertificate(
int import_result = cert_database->ImportFromPKCS12(
module.get(), decoded_pkcs12, string16(), false, &imported_certs);
if (import_result != net::OK) {
- ONC_LOG_ERROR("Unable to import client certificate (error " +
- net::ErrorToString(import_result) + ").");
+ ONC_LOG_ERROR(
+ base::StringPrintf("Unable to import client certificate (error %s)",
+ net::ErrorToString(import_result)));
return false;
}
« no previous file with comments | « chromeos/network/network_state_handler_unittest.cc ('k') | chromeos/network/shill_property_handler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698