summaryrefslogtreecommitdiffstats
path: root/net/disk_cache
diff options
context:
space:
mode:
Diffstat (limited to 'net/disk_cache')
-rw-r--r--net/disk_cache/stats_histogram.cc12
-rw-r--r--net/disk_cache/stats_histogram.h11
2 files changed, 7 insertions, 16 deletions
diff --git a/net/disk_cache/stats_histogram.cc b/net/disk_cache/stats_histogram.cc
index 66c8e50..d3bab34 100644
--- a/net/disk_cache/stats_histogram.cc
+++ b/net/disk_cache/stats_histogram.cc
@@ -33,20 +33,16 @@ StatsHistogram* StatsHistogram::FactoryGet(const std::string& name) {
// 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 @@ Histogram::Inconsistencies StatsHistogram::FindCorruption(
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
diff --git a/net/disk_cache/stats_histogram.h b/net/disk_cache/stats_histogram.h
index 97b2d401..f3af304 100644
--- a/net/disk_cache/stats_histogram.h
+++ b/net/disk_cache/stats_histogram.h
@@ -1,4 +1,4 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -29,9 +29,11 @@ class StatsHistogram : public base::Histogram {
}
};
- StatsHistogram(const std::string& name, Sample minimum,
- Sample maximum, size_t bucket_count)
- : Histogram(name, minimum, maximum, bucket_count), init_(false) {}
+ StatsHistogram(const std::string& name,
+ Sample minimum,
+ Sample maximum,
+ size_t bucket_count)
+ : Histogram(name, minimum, maximum, bucket_count, NULL), init_(false) {}
virtual ~StatsHistogram();
static StatsHistogram* FactoryGet(const std::string& name);
@@ -44,7 +46,6 @@ class StatsHistogram : public base::Histogram {
virtual void SnapshotSample(SampleSet* sample) const OVERRIDE;
virtual Inconsistencies FindCorruption(
const SampleSet& snapshot) const OVERRIDE;
- virtual uint32 CalculateRangeChecksum() const OVERRIDE;
private:
bool init_;