#ifndef NET_DISK_CACHE_BLOCKFILE_STATS_HISTOGRAM_H_
#define NET_DISK_CACHE_BLOCKFILE_STATS_HISTOGRAM_H_
#include <string>
#include "base/memory/scoped_ptr.h"
#include "base/metrics/histogram.h"
namespace base {
class BucketRanges;
class HistogramSamples;
class SampleVector;
}
namespace disk_cache {
class Stats;
class StatsHistogram : public base::Histogram {
public:
StatsHistogram(const std::string& name,
Sample minimum,
Sample maximum,
const base::BucketRanges* ranges,
const Stats* stats);
virtual ~StatsHistogram();
static void InitializeBucketRanges(const Stats* stats,
base::BucketRanges* ranges);
static StatsHistogram* FactoryGet(const std::string& name,
const Stats* stats);
void Disable();
virtual scoped_ptr<base::HistogramSamples> SnapshotSamples() const OVERRIDE;
virtual int FindCorruption(
const base::HistogramSamples& samples) const OVERRIDE;
private:
const Stats* stats_;
DISALLOW_COPY_AND_ASSIGN(StatsHistogram);
};
}
#endif