Index: chrome/browser/ui/webui/performance_monitor/web_ui_handler.cc |
diff --git a/chrome/browser/ui/webui/performance_monitor/web_ui_handler.cc b/chrome/browser/ui/webui/performance_monitor/web_ui_handler.cc |
index 5029f87bd6a5bc5bee64f7b774828f3b148501e1..d5598dddca8d2e6e2f2d94a56c0f7e56a8aa6355 100644 |
--- a/chrome/browser/ui/webui/performance_monitor/web_ui_handler.cc |
+++ b/chrome/browser/ui/webui/performance_monitor/web_ui_handler.cc |
@@ -59,7 +59,7 @@ void DoGetMetric(ListValue* results, |
const base::TimeDelta& resolution) { |
Database* db = PerformanceMonitor::GetInstance()->database(); |
Database::MetricVectorMap metric_vector_map = db->GetStatsForMetricByActivity( |
- MetricTypeToString(metric_type), start, end); |
+ metric_type, start, end); |
linked_ptr<Database::MetricInfoVector> metric_vector = |
metric_vector_map[kProcessChromeAggregate]; |
@@ -174,10 +174,14 @@ void WebUIHandler::HandleGetAllMetricTypes(const ListValue* args) { |
ListValue results; |
for (int i = 0; i < METRIC_NUMBER_OF_METRICS; ++i) { |
MetricType metric_type = static_cast<MetricType>(i); |
+ const MetricDetails* metric_details = GetMetricDetails(metric_type); |
+ |
DictionaryValue* metric_type_info = new DictionaryValue(); |
metric_type_info->SetInteger("metricType", metric_type); |
metric_type_info->SetString("shortDescription", |
- MetricTypeToString(metric_type)); |
+ metric_details->description); |
+ metric_type_info->SetDouble("maxValue", metric_details->max_value); |
+ metric_type_info->SetString("units", metric_details->units); |
results.Append(metric_type_info); |
} |