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

Unified Diff: base/logging.cc

Issue 1538743002: Switch to standard integer types in base/. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: DEPS roll too Created 5 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 | « base/logging.h ('k') | base/logging_unittest.cc » ('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 22e0aa0c6371fea45122739a9d90203dc000e12e..9ad50e8d9934d8f941aafae0083174bd53f9ebba 100644
--- a/base/logging.cc
+++ b/base/logging.cc
@@ -5,6 +5,10 @@
#include "base/logging.h"
#include <limits.h>
+#include <stdint.h>
+
+#include "base/macros.h"
+#include "build/build_config.h"
#if defined(OS_WIN)
#include <io.h>
@@ -128,7 +132,7 @@ LogMessageHandlerFunction log_message_handler = nullptr;
// Helper functions to wrap platform differences.
-int32 CurrentProcessId() {
+int32_t CurrentProcessId() {
#if defined(OS_WIN)
return GetCurrentProcessId();
#elif defined(OS_POSIX)
@@ -136,7 +140,7 @@ int32 CurrentProcessId() {
#endif
}
-uint64 TickCount() {
+uint64_t TickCount() {
#if defined(OS_WIN)
return GetTickCount();
#elif defined(OS_MACOSX)
@@ -149,9 +153,8 @@ uint64 TickCount() {
struct timespec ts;
clock_gettime(CLOCK_MONOTONIC, &ts);
- uint64 absolute_micro =
- static_cast<int64>(ts.tv_sec) * 1000000 +
- static_cast<int64>(ts.tv_nsec) / 1000;
+ uint64_t absolute_micro = static_cast<int64_t>(ts.tv_sec) * 1000000 +
+ static_cast<int64_t>(ts.tv_nsec) / 1000;
return absolute_micro;
#endif
« no previous file with comments | « base/logging.h ('k') | base/logging_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698