Chromium Code Reviews| Index: chrome/browser/performance_monitor/metric.h |
| diff --git a/chrome/browser/performance_monitor/metric.h b/chrome/browser/performance_monitor/metric.h |
| index 76e8ded8d814ad2b38fdf90daa6780a84e35745a..d958993b478de6c8e707af1d4c75c86e452e8c7b 100644 |
| --- a/chrome/browser/performance_monitor/metric.h |
| +++ b/chrome/browser/performance_monitor/metric.h |
| @@ -32,10 +32,22 @@ METRIC_NUMBER_OF_METRICS |
| struct Metric { |
| public: |
| Metric(); |
| - Metric(const base::Time& metric_time, const double metric_value); |
| - Metric(const std::string& metric_time, const std::string& metric_value); |
| + Metric(MetricType metric_type, |
| + const base::Time& metric_time, |
| + const double metric_value); |
| + Metric(MetricType metric_type, |
| + const std::string& metric_time, |
| + const std::string& metric_value); |
| ~Metric(); |
| + // Check the value in the metric to make sure that it is reasonable. Since |
| + // some metric-gathering methods will fail and return incorrect values, we |
| + // need to try to weed these out as best we can. |
| + bool Validate() const; |
|
Yoyo Zhou
2012/09/10 23:52:44
This should be called something like IsValid.
Devlin
2012/09/11 18:52:17
Done.
|
| + |
| + std::string ValueAsString() const; |
|
Yoyo Zhou
2012/09/10 23:52:44
Does this make sense if the metric isn't valid? If
Devlin
2012/09/11 18:52:17
Done.
Yoyo Zhou
2012/09/13 00:09:20
I was hoping more for something like, "This only m
Devlin
2012/09/13 17:00:24
Done.
|
| + |
| + MetricType type; |
| base::Time time; |
| double value; |
| }; |