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

Unified Diff: third_party/leveldatabase/chromium_logger.h

Issue 416633002: Cleanup Chrome's LevelDB env to conform to C++ style guidelines. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed snprintf with pid_t Created 6 years, 5 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 | « no previous file | third_party/leveldatabase/env_chromium.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/leveldatabase/chromium_logger.h
diff --git a/third_party/leveldatabase/chromium_logger.h b/third_party/leveldatabase/chromium_logger.h
index 76862c35ff691de7a4a37c543b0e8bd860880a29..c494dd1ffce572f869d54e2c1bd79e232a64a86d 100644
--- a/third_party/leveldatabase/chromium_logger.h
+++ b/third_party/leveldatabase/chromium_logger.h
@@ -5,23 +5,25 @@
#ifndef THIRD_PARTY_LEVELDATABASE_CHROMIUM_LOGGER_H_
#define THIRD_PARTY_LEVELDATABASE_CHROMIUM_LOGGER_H_
-#include <algorithm>
#include <stdio.h>
+
+#include <algorithm>
+
#include "base/format_macros.h"
#include "base/strings/string_util.h"
#include "base/time/time.h"
-#include "leveldb/env.h"
+#include "third_party/leveldatabase/src/include/leveldb/env.h"
namespace leveldb {
class ChromiumLogger : public Logger {
public:
- ChromiumLogger(FILE* f) : file_(f) { }
+ explicit ChromiumLogger(FILE* f) : file_(f) {}
virtual ~ChromiumLogger() {
fclose(file_);
}
virtual void Logv(const char* format, va_list ap) {
- const long long unsigned int thread_id =
+ const base::PlatformThreadId thread_id =
::base::PlatformThread::CurrentId();
// We try twice: the first time with a fixed-size stack allocated buffer,
@@ -52,7 +54,7 @@ class ChromiumLogger : public Logger {
t.minute,
t.second,
t.millisecond,
- thread_id);
+ static_cast<long long unsigned int>(thread_id));
// Print the message
if (p < limit) {
@@ -85,6 +87,7 @@ class ChromiumLogger : public Logger {
break;
}
}
+
private:
FILE* file_;
};
« no previous file with comments | « no previous file | third_party/leveldatabase/env_chromium.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698