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

Unified Diff: base/trace_event/trace_log.cc

Issue 1546033002: Switch to standard integer types in base/trace_event/. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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/trace_event/trace_log.h ('k') | base/trace_event/trace_sampling_thread.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/trace_event/trace_log.cc
diff --git a/base/trace_event/trace_log.cc b/base/trace_event/trace_log.cc
index 59bc15a70cf70e7a17228f9041396cb4065a2581..c36550a95722f7336854b10150ab711869a6a1fe 100644
--- a/base/trace_event/trace_log.cc
+++ b/base/trace_event/trace_log.cc
@@ -14,6 +14,7 @@
#include "base/debug/leak_annotations.h"
#include "base/lazy_instance.h"
#include "base/location.h"
+#include "base/macros.h"
#include "base/memory/scoped_ptr.h"
#include "base/memory/singleton.h"
#include "base/process/process_metrics.h"
@@ -36,6 +37,7 @@
#include "base/trace_event/trace_event.h"
#include "base/trace_event/trace_event_synthetic_delay.h"
#include "base/trace_event/trace_sampling_thread.h"
+#include "build/build_config.h"
#if defined(OS_WIN)
#include "base/trace_event/trace_event_etw_export_win.h"
@@ -164,7 +166,7 @@ class AutoThreadLocalBoolean {
// Use this function instead of TraceEventHandle constructor to keep the
// overhead of ScopedTracer (trace_event.h) constructor minimum.
-void MakeHandle(uint32 chunk_seq,
+void MakeHandle(uint32_t chunk_seq,
size_t chunk_index,
size_t event_index,
TraceEventHandle* handle) {
@@ -172,8 +174,8 @@ void MakeHandle(uint32 chunk_seq,
DCHECK(chunk_index <= TraceBufferChunk::kMaxChunkIndex);
DCHECK(event_index < TraceBufferChunk::kTraceBufferChunkSize);
handle->chunk_seq = chunk_seq;
- handle->chunk_index = static_cast<uint16>(chunk_index);
- handle->event_index = static_cast<uint16>(event_index);
+ handle->chunk_index = static_cast<uint16_t>(chunk_index);
+ handle->event_index = static_cast<uint16_t>(event_index);
}
} // namespace
@@ -491,7 +493,7 @@ void TraceLog::UpdateSyntheticDelaysFromTraceConfig() {
double target_duration = strtod(token.c_str(), &duration_end);
if (duration_end != token.c_str()) {
delay->SetTargetDuration(TimeDelta::FromMicroseconds(
- static_cast<int64>(target_duration * 1e6)));
+ static_cast<int64_t>(target_duration * 1e6)));
} else if (token == "static") {
delay->SetMode(TraceEventSyntheticDelay::STATIC);
} else if (token == "oneshot") {
@@ -1489,7 +1491,7 @@ void TraceLog::CancelWatchEvent() {
watch_event_callback_.Reset();
}
-uint64 TraceLog::MangleEventId(uint64 id) {
+uint64_t TraceLog::MangleEventId(uint64_t id) {
return id ^ process_id_hash_;
}
« no previous file with comments | « base/trace_event/trace_log.h ('k') | base/trace_event/trace_sampling_thread.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698