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

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

Issue 11419224: Add missing (and remove superfluous) 'explicit' from constructors. Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase + remove non-straightforward changes Created 7 years, 11 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_map.h ('k') | base/synchronization/condition_variable_unittest.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 21 matching lines...) Expand all
32 virtual bool HasConstructionArguments(Sample minimum, 32 virtual bool HasConstructionArguments(Sample minimum,
33 Sample maximum, 33 Sample maximum,
34 size_t bucket_count) const OVERRIDE; 34 size_t bucket_count) const OVERRIDE;
35 virtual void Add(Sample value) OVERRIDE; 35 virtual void Add(Sample value) OVERRIDE;
36 virtual void WriteHTMLGraph(std::string* output) const OVERRIDE; 36 virtual void WriteHTMLGraph(std::string* output) const OVERRIDE;
37 virtual void WriteAscii(std::string* output) const OVERRIDE; 37 virtual void WriteAscii(std::string* output) const OVERRIDE;
38 virtual scoped_ptr<HistogramSamples> SnapshotSamples() const OVERRIDE; 38 virtual scoped_ptr<HistogramSamples> SnapshotSamples() const OVERRIDE;
39 39
40 private: 40 private:
41 // Clients should always use FactoryGet to create SparseHistogram. 41 // Clients should always use FactoryGet to create SparseHistogram.
42 SparseHistogram(const std::string& name); 42 explicit SparseHistogram(const std::string& name);
43 43
44 virtual void GetParameters(DictionaryValue* params) const OVERRIDE; 44 virtual void GetParameters(DictionaryValue* params) const OVERRIDE;
45 virtual void GetCountAndBucketData(Count* count, 45 virtual void GetCountAndBucketData(Count* count,
46 ListValue* buckets) const OVERRIDE; 46 ListValue* buckets) const OVERRIDE;
47 47
48 friend class SparseHistogramTest; // For constuctor calling. 48 friend class SparseHistogramTest; // For constuctor calling.
49 49
50 // Protects access to |sample_counts_| and |redundant_count_|. 50 // Protects access to |sample_counts_| and |redundant_count_|.
51 mutable base::Lock lock_; 51 mutable base::Lock lock_;
52 std::map<HistogramBase::Sample, HistogramBase::Count> sample_counts_; 52 std::map<HistogramBase::Sample, HistogramBase::Count> sample_counts_;
53 HistogramBase::Count redundant_count_; 53 HistogramBase::Count redundant_count_;
54 54
55 DISALLOW_COPY_AND_ASSIGN(SparseHistogram); 55 DISALLOW_COPY_AND_ASSIGN(SparseHistogram);
56 }; 56 };
57 57
58 } // namespace base 58 } // namespace base
59 59
60 #endif // BASE_METRICS_SPARSE_HISTOGRAM_H_ 60 #endif // BASE_METRICS_SPARSE_HISTOGRAM_H_
OLDNEW
« no previous file with comments | « base/metrics/sample_map.h ('k') | base/synchronization/condition_variable_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698