Chromium Code Reviews| Index: base/metrics/histogram_base.h |
| diff --git a/base/metrics/histogram_base.h b/base/metrics/histogram_base.h |
| index 5e27e1e4bfe63bd289468288bd436f706384795a..ca1e9531a9e5a6179f5e982b0bdd7e5c69982b0c 100644 |
| --- a/base/metrics/histogram_base.h |
| +++ b/base/metrics/histogram_base.h |
| @@ -14,9 +14,25 @@ |
| namespace base { |
| class DictionaryValue; |
| +class HistogramSamples; |
| class ListValue; |
| -class HistogramSamples; |
| +//////////////////////////////////////////////////////////////////////////////// |
| +// These enums are used to facilitate deserialization of histograms from other |
| +// processes into the browser. If you create another class inherits |
|
Ilya Sherman
2012/10/31 00:35:19
nit: "class inherits" -> "class that inherits from
kaiwang
2012/10/31 01:12:56
Done.
|
| +// HistogramBase, add new histogram types and names below. |
| + |
| +enum BASE_EXPORT HistogramType { |
| + HISTOGRAM, |
| + LINEAR_HISTOGRAM, |
| + BOOLEAN_HISTOGRAM, |
| + CUSTOM_HISTOGRAM, |
| + SPARSE_HISTOGRAM, |
| +}; |
| + |
| +std::string HistogramTypeName(HistogramType type); |
|
Ilya Sherman
2012/10/31 00:35:19
Optional nit: Perhaps "HistogramTypeToString"?
kaiwang
2012/10/31 01:12:56
Done.
|
| + |
| +//////////////////////////////////////////////////////////////////////////////// |
| class BASE_EXPORT HistogramBase { |
| public: |
| @@ -40,7 +56,6 @@ class BASE_EXPORT HistogramBase { |
| kHexRangePrintingFlag = 0x8000, |
| }; |
| - |
| HistogramBase(const std::string& name); |
| virtual ~HistogramBase(); |
| @@ -51,6 +66,8 @@ class BASE_EXPORT HistogramBase { |
| void SetFlags(int32 flags); |
| void ClearFlags(int32 flags); |
| + virtual HistogramType GetHistogramType() const = 0; |
| + |
| // Whether the histogram has construction arguments as parameters specified. |
| // For histograms that don't have the concept of minimum, maximum or |
| // bucket_count, this function always returns false. |