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..3162a3f371b4671be7d4248905ac54f959870462 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( |
Evan Stade
2012/07/24 18:53:04
I think it would be easier to read if you line bre
Matt Tytel
2012/07/24 20:11:20
Done.
|
- 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("tickSize", metric_details->tick_size); |
+ metric_type_info->SetString("units", metric_details->units); |
results.Append(metric_type_info); |
} |