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

Unified Diff: components/metrics/metrics_service_unittest.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
« no previous file with comments | « components/metrics/metrics_service_client.h ('k') | components/metrics/metrics_state_manager.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/metrics/metrics_service_unittest.cc
diff --git a/components/metrics/metrics_service_unittest.cc b/components/metrics/metrics_service_unittest.cc
index e3de5aebda0a6a2556c9b5942fa5cd3b67679c42..c4ed553029b10d4409bc84151bfb5b2d87ec38d4 100644
--- a/components/metrics/metrics_service_unittest.cc
+++ b/components/metrics/metrics_service_unittest.cc
@@ -4,9 +4,12 @@
#include "components/metrics/metrics_service.h"
+#include <stdint.h>
+
#include <string>
#include "base/bind.h"
+#include "base/macros.h"
#include "base/memory/scoped_ptr.h"
#include "base/message_loop/message_loop.h"
#include "base/metrics/metrics_hashes.h"
@@ -108,8 +111,8 @@ class MetricsServiceTest : public testing::Test {
const std::vector<variations::ActiveGroupId>& synthetic_trials,
const std::string& trial_name,
const std::string& trial_group) {
- uint32 trial_name_hash = HashName(trial_name);
- uint32 trial_group_hash = HashName(trial_group);
+ uint32_t trial_name_hash = HashName(trial_name);
+ uint32_t trial_group_hash = HashName(trial_group);
for (const variations::ActiveGroupId& trial : synthetic_trials) {
if (trial.name == trial_name_hash && trial.group == trial_group_hash)
return true;
@@ -120,7 +123,7 @@ class MetricsServiceTest : public testing::Test {
// Finds a histogram with the specified |name_hash| in |histograms|.
const base::HistogramBase* FindHistogram(
const base::StatisticsRecorder::Histograms& histograms,
- uint64 name_hash) {
+ uint64_t name_hash) {
for (const base::HistogramBase* histogram : histograms) {
if (name_hash == base::HashMetricName(histogram->histogram_name()))
return histogram;
@@ -137,7 +140,7 @@ class MetricsServiceTest : public testing::Test {
base::StatisticsRecorder::Histograms histograms;
base::StatisticsRecorder::GetHistograms(&histograms);
for (int i = 0; i < uma_log.histogram_event_size(); ++i) {
- const uint64 hash = uma_log.histogram_event(i).name_hash();
+ const uint64_t hash = uma_log.histogram_event(i).name_hash();
const base::HistogramBase* histogram = FindHistogram(histograms, hash);
EXPECT_TRUE(histogram) << hash;
« no previous file with comments | « components/metrics/metrics_service_client.h ('k') | components/metrics/metrics_state_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698