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

Unified Diff: base/metrics/persistent_sample_map_unittest.cc

Issue 2853853002: Fix overflow when logging MaxInt32 to a sparse histogram. (Closed)
Patch Set: Address comments. Created 3 years, 8 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 | « base/metrics/persistent_sample_map.cc ('k') | base/metrics/sample_map.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/metrics/persistent_sample_map_unittest.cc
diff --git a/base/metrics/persistent_sample_map_unittest.cc b/base/metrics/persistent_sample_map_unittest.cc
index d50ab997b2539d16b3e6ab1aa61c968b00a2e602..933734bd91d8d264f23eb5c3246937d1bf500b4c 100644
--- a/base/metrics/persistent_sample_map_unittest.cc
+++ b/base/metrics/persistent_sample_map_unittest.cc
@@ -164,7 +164,7 @@ TEST(PersistentSampleMapIteratorTest, IterateTest) {
std::unique_ptr<SampleCountIterator> it = samples.Iterator();
HistogramBase::Sample min;
- HistogramBase::Sample max;
+ int64_t max;
HistogramBase::Count count;
it->Get(&min, &max, &count);
@@ -214,7 +214,7 @@ TEST(PersistentSampleMapIteratorTest, SkipEmptyRanges) {
EXPECT_FALSE(it->Done());
HistogramBase::Sample min;
- HistogramBase::Sample max;
+ int64_t max;
HistogramBase::Count count;
it->Get(&min, &max, &count);
@@ -245,7 +245,7 @@ TEST(PersistentSampleMapIteratorDeathTest, IterateDoneTest) {
EXPECT_TRUE(it->Done());
HistogramBase::Sample min;
- HistogramBase::Sample max;
+ int64_t max;
HistogramBase::Count count;
EXPECT_DCHECK_DEATH(it->Get(&min, &max, &count));
« no previous file with comments | « base/metrics/persistent_sample_map.cc ('k') | base/metrics/sample_map.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698