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

Unified Diff: components/metrics/call_stack_profile_metrics_provider.cc

Issue 1548113002: Switch to standard integer types in components/, part 2 of 4. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: gn 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
Index: components/metrics/call_stack_profile_metrics_provider.cc
diff --git a/components/metrics/call_stack_profile_metrics_provider.cc b/components/metrics/call_stack_profile_metrics_provider.cc
index 56c0973edf7e149bfe7d36ba45050107fd46f540..7ad942d3fca328922aaa97092035097e69addd98 100644
--- a/components/metrics/call_stack_profile_metrics_provider.cc
+++ b/components/metrics/call_stack_profile_metrics_provider.cc
@@ -4,6 +4,9 @@
#include "components/metrics/call_stack_profile_metrics_provider.h"
+#include <stddef.h>
+#include <stdint.h>
+
#include <algorithm>
#include <cstring>
#include <map>
@@ -201,7 +204,7 @@ void IgnoreCompletedProfiles(
// Functions to encode protobufs ----------------------------------------------
// The protobuf expects the MD5 checksum prefix of the module name.
-uint64 HashModuleFilename(const base::FilePath& filename) {
+uint64_t HashModuleFilename(const base::FilePath& filename) {
const base::FilePath::StringType basename = filename.BaseName().value();
// Copy the bytes in basename into a string buffer.
size_t basename_length_in_bytes =
@@ -224,11 +227,11 @@ void CopySampleToProto(
// leave call_stack_entry empty.
if (frame.module_index == StackSamplingProfiler::Frame::kUnknownModuleIndex)
continue;
- int64 module_offset =
+ int64_t module_offset =
reinterpret_cast<const char*>(frame.instruction_pointer) -
reinterpret_cast<const char*>(modules[frame.module_index].base_address);
DCHECK_GE(module_offset, 0);
- entry->set_address(static_cast<uint64>(module_offset));
+ entry->set_address(static_cast<uint64_t>(module_offset));
entry->set_module_id_index(frame.module_index);
}
}

Powered by Google App Engine
This is Rietveld 408576698