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

Unified Diff: net/disk_cache/stats_histogram.cc

Issue 10834011: Refactor of Histogram related code (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 5 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
Index: net/disk_cache/stats_histogram.cc
===================================================================
--- net/disk_cache/stats_histogram.cc (revision 148055)
+++ net/disk_cache/stats_histogram.cc (working copy)
@@ -33,20 +33,16 @@
// To avoid racy destruction at shutdown, the following will be leaked.
StatsHistogram* stats_histogram =
new StatsHistogram(name, minimum, maximum, bucket_count);
- stats_histogram->InitializeBucketRange();
stats_histogram->SetFlags(kUmaTargetedHistogramFlag);
histogram = StatisticsRecorder::RegisterOrDeleteDuplicate(stats_histogram);
}
DCHECK(HISTOGRAM == histogram->histogram_type());
- DCHECK(histogram->HasConstructorArguments(minimum, maximum, bucket_count));
+ DCHECK(histogram->HasConstructionArguments(minimum, maximum, bucket_count));
// We're preparing for an otherwise unsafe upcast by ensuring we have the
// proper class type.
StatsHistogram* return_histogram = static_cast<StatsHistogram*>(histogram);
- // Validate upcast by seeing that we're probably providing the checksum.
- CHECK_EQ(return_histogram->StatsHistogram::CalculateRangeChecksum(),
- return_histogram->CalculateRangeChecksum());
return return_histogram;
}
@@ -87,10 +83,4 @@
return NO_INCONSISTENCIES; // This class won't monitor inconsistencies.
}
-uint32 StatsHistogram::CalculateRangeChecksum() const {
- // We don't calculate checksums, so at least establish a unique constant.
- const uint32 kStatsHistogramChecksum = 0x0cecce;
- return kStatsHistogramChecksum;
-}
-
} // namespace disk_cache

Powered by Google App Engine
This is Rietveld 408576698