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

Unified Diff: base/logging.cc

Issue 773373002: Update from https://crrev.com/306706 (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 years 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 | « DEPS ('k') | base/process/kill.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/logging.cc
diff --git a/base/logging.cc b/base/logging.cc
index f3601eef28ba9ed44f8b2809643e79c2d8244a06..327ac7792862138a8ceec46de367f443689bd018 100644
--- a/base/logging.cc
+++ b/base/logging.cc
@@ -19,7 +19,7 @@ typedef HANDLE MutexHandle;
#include <mach-o/dyld.h>
#elif defined(OS_POSIX)
#if defined(OS_NACL)
-#include <sys/time.h> // timespec doesn't seem to be in <time.h>
+#include <sys/time.h> // timespec doesn't seem to be in <time.h>
#else
#include <sys/syscall.h>
#endif
@@ -76,8 +76,7 @@ VlogInfo* g_vlog_info_prev = NULL;
const char* const log_severity_names[LOG_NUM_SEVERITIES] = {
"INFO", "WARNING", "ERROR", "FATAL" };
-const char* log_severity_name(int severity)
-{
+const char* log_severity_name(int severity) {
if (severity >= 0 && severity < LOG_NUM_SEVERITIES)
return log_severity_names[severity];
return "UNKNOWN";
@@ -152,7 +151,7 @@ uint64 TickCount() {
void DeleteFilePath(const PathString& log_name) {
#if defined(OS_WIN)
DeleteFile(log_name.c_str());
-#elif defined (OS_NACL)
+#elif defined(OS_NACL)
// Do nothing; unlink() isn't supported on NaCl.
#else
unlink(log_name.c_str());
@@ -706,8 +705,8 @@ SystemErrorCode GetLastSystemErrorCode() {
#if defined(OS_WIN)
BASE_EXPORT std::string SystemErrorCodeToString(SystemErrorCode error_code) {
- const int error_message_buffer_size = 256;
- char msgbuf[error_message_buffer_size];
+ const int kErrorMessageBufferSize = 256;
+ char msgbuf[kErrorMessageBufferSize];
DWORD flags = FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_IGNORE_INSERTS;
DWORD len = FormatMessageA(flags, NULL, error_code, 0, msgbuf,
arraysize(msgbuf), NULL);
@@ -808,5 +807,5 @@ std::wstring GetLogFileFullPath() {
} // namespace logging
std::ostream& std::operator<<(std::ostream& out, const wchar_t* wstr) {
- return out << base::WideToUTF8(std::wstring(wstr));
+ return out << base::WideToUTF8(wstr);
}
« no previous file with comments | « DEPS ('k') | base/process/kill.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698