OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef NET_DISK_CACHE_STATS_HISTOGRAM_H_ | 5 #ifndef NET_DISK_CACHE_STATS_HISTOGRAM_H_ |
6 #define NET_DISK_CACHE_STATS_HISTOGRAM_H_ | 6 #define NET_DISK_CACHE_STATS_HISTOGRAM_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
(...skipping 14 matching lines...) Expand all Loading... |
25 // SampleVector with a copy of our data. | 25 // SampleVector with a copy of our data. |
26 // | 26 // |
27 // Class derivation of Histogram "deprecated," and should not be copied, and | 27 // Class derivation of Histogram "deprecated," and should not be copied, and |
28 // may eventually go away. | 28 // may eventually go away. |
29 // | 29 // |
30 class StatsHistogram : public base::Histogram { | 30 class StatsHistogram : public base::Histogram { |
31 public: | 31 public: |
32 StatsHistogram(const std::string& name, | 32 StatsHistogram(const std::string& name, |
33 Sample minimum, | 33 Sample minimum, |
34 Sample maximum, | 34 Sample maximum, |
35 size_t bucket_count, | |
36 const base::BucketRanges* ranges, | 35 const base::BucketRanges* ranges, |
37 const Stats* stats); | 36 const Stats* stats); |
38 virtual ~StatsHistogram(); | 37 virtual ~StatsHistogram(); |
39 | 38 |
40 static void InitializeBucketRanges(const Stats* stats, | 39 static void InitializeBucketRanges(const Stats* stats, |
41 base::BucketRanges* ranges); | 40 base::BucketRanges* ranges); |
42 static StatsHistogram* FactoryGet(const std::string& name, | 41 static StatsHistogram* FactoryGet(const std::string& name, |
43 const Stats* stats); | 42 const Stats* stats); |
44 | 43 |
45 virtual scoped_ptr<base::HistogramSamples> SnapshotSamples() const OVERRIDE; | 44 virtual scoped_ptr<base::HistogramSamples> SnapshotSamples() const OVERRIDE; |
46 virtual int FindCorruption( | 45 virtual int FindCorruption( |
47 const base::HistogramSamples& samples) const OVERRIDE; | 46 const base::HistogramSamples& samples) const OVERRIDE; |
48 | 47 |
49 private: | 48 private: |
50 const Stats* stats_; | 49 const Stats* stats_; |
51 DISALLOW_COPY_AND_ASSIGN(StatsHistogram); | 50 DISALLOW_COPY_AND_ASSIGN(StatsHistogram); |
52 }; | 51 }; |
53 | 52 |
54 } // namespace disk_cache | 53 } // namespace disk_cache |
55 | 54 |
56 #endif // NET_DISK_CACHE_STATS_HISTOGRAM_H_ | 55 #endif // NET_DISK_CACHE_STATS_HISTOGRAM_H_ |
OLD | NEW |