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

Side by Side Diff: base/metrics/sparse_histogram.h

Issue 17451016: [UMA] Remove redundant bucket_count variable from base::Histogram. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rename variables to be clearer Created 7 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « base/metrics/sample_vector_unittest.cc ('k') | base/metrics/sparse_histogram.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 BASE_METRICS_SPARSE_HISTOGRAM_H_ 5 #ifndef BASE_METRICS_SPARSE_HISTOGRAM_H_
6 #define BASE_METRICS_SPARSE_HISTOGRAM_H_ 6 #define BASE_METRICS_SPARSE_HISTOGRAM_H_
7 7
8 #include <map> 8 #include <map>
9 #include <string> 9 #include <string>
10 10
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
57 class BASE_EXPORT_PRIVATE SparseHistogram : public HistogramBase { 57 class BASE_EXPORT_PRIVATE SparseHistogram : public HistogramBase {
58 public: 58 public:
59 // If there's one with same name, return the existing one. If not, create a 59 // If there's one with same name, return the existing one. If not, create a
60 // new one. 60 // new one.
61 static HistogramBase* FactoryGet(const std::string& name, int32 flags); 61 static HistogramBase* FactoryGet(const std::string& name, int32 flags);
62 62
63 virtual ~SparseHistogram(); 63 virtual ~SparseHistogram();
64 64
65 // HistogramBase implementation: 65 // HistogramBase implementation:
66 virtual HistogramType GetHistogramType() const OVERRIDE; 66 virtual HistogramType GetHistogramType() const OVERRIDE;
67 virtual bool HasConstructionArguments(Sample minimum, 67 virtual bool HasConstructionArguments(
68 Sample maximum, 68 Sample expected_minimum,
69 size_t bucket_count) const OVERRIDE; 69 Sample expected_maximum,
70 size_t expected_bucket_count) const OVERRIDE;
70 virtual void Add(Sample value) OVERRIDE; 71 virtual void Add(Sample value) OVERRIDE;
71 virtual void AddSamples(const HistogramSamples& samples) OVERRIDE; 72 virtual void AddSamples(const HistogramSamples& samples) OVERRIDE;
72 virtual bool AddSamplesFromPickle(PickleIterator* iter) OVERRIDE; 73 virtual bool AddSamplesFromPickle(PickleIterator* iter) OVERRIDE;
73 virtual scoped_ptr<HistogramSamples> SnapshotSamples() const OVERRIDE; 74 virtual scoped_ptr<HistogramSamples> SnapshotSamples() const OVERRIDE;
74 virtual void WriteHTMLGraph(std::string* output) const OVERRIDE; 75 virtual void WriteHTMLGraph(std::string* output) const OVERRIDE;
75 virtual void WriteAscii(std::string* output) const OVERRIDE; 76 virtual void WriteAscii(std::string* output) const OVERRIDE;
76 77
77 protected: 78 protected:
78 // HistogramBase implementation: 79 // HistogramBase implementation:
79 virtual bool SerializeInfoImpl(Pickle* pickle) const OVERRIDE; 80 virtual bool SerializeInfoImpl(Pickle* pickle) const OVERRIDE;
(...skipping 27 matching lines...) Expand all
107 mutable base::Lock lock_; 108 mutable base::Lock lock_;
108 109
109 SampleMap samples_; 110 SampleMap samples_;
110 111
111 DISALLOW_COPY_AND_ASSIGN(SparseHistogram); 112 DISALLOW_COPY_AND_ASSIGN(SparseHistogram);
112 }; 113 };
113 114
114 } // namespace base 115 } // namespace base
115 116
116 #endif // BASE_METRICS_SPARSE_HISTOGRAM_H_ 117 #endif // BASE_METRICS_SPARSE_HISTOGRAM_H_
OLDNEW
« no previous file with comments | « base/metrics/sample_vector_unittest.cc ('k') | base/metrics/sparse_histogram.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698