OLD | NEW |
(Empty) | |
| 1 // Copyright (c) 2014 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef BASE_METRICS_LINEARHISTOGRAM_SAMPLE_H |
| 6 #define BASE_METRICS_LINEARHISTOGRAM_SAMPLE_H |
| 7 |
| 8 #include <string> |
| 9 |
| 10 #include "base/base_export.h" |
| 11 #include "base/metrics/metric_sample.h" |
| 12 |
| 13 namespace base { |
| 14 class BASE_EXPORT LinearHistogramSample : public MetricSample { |
| 15 public: |
| 16 LinearHistogramSample(const std::string& histname, int sample, int max); |
| 17 virtual ~LinearHistogramSample(); |
| 18 int sample(); |
| 19 int max(); |
| 20 string toString() const; |
| 21 |
| 22 // static |
| 23 static LinearHistogramSample* ReadLinearHistogram( |
| 24 const std::string& serialized_histogram); |
| 25 |
| 26 protected: |
| 27 int max_, sample_; |
| 28 }; |
| 29 } // namespace base |
| 30 #endif // BASE_METRICS_LINEARHISTOGRAM_SAMPLE_H |
OLD | NEW |