Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(26)

Side by Side Diff: chrome/browser/performance_monitor/metric_details.h

Issue 10805050: Chrome Performance Monitor: MetricDetails refactor. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 8 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CHROME_BROWSER_PERFORMANCE_MONITOR_METRIC_DETAILS_H_ 5 #ifndef CHROME_BROWSER_PERFORMANCE_MONITOR_METRIC_DETAILS_H_
6 #define CHROME_BROWSER_PERFORMANCE_MONITOR_METRIC_DETAILS_H_ 6 #define CHROME_BROWSER_PERFORMANCE_MONITOR_METRIC_DETAILS_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 namespace performance_monitor { 10 namespace performance_monitor {
11 11
12 // Keep this enum synced with kMetricDetailsList in the cc file.
12 enum MetricType { 13 enum MetricType {
13 METRIC_SAMPLE, 14 METRIC_SAMPLE,
eaugusti 2012/07/21 02:00:40 Are there any more metrics that we can add now? CP
Matt Tytel 2012/07/21 02:11:40 In Mitchell's CL: http://codereview.chromium.org/1
Matt Tytel 2012/07/23 22:24:00 Done.
14 METRIC_NUMBER_OF_METRICS 15 METRIC_NUMBER_OF_METRICS
15 }; 16 };
16 17
17 const char* MetricTypeToString(MetricType event_type); 18 struct MetricDetails {
19 const char* const name;
20 const char* const description;
21 const char* const units;
22 const double max_value;
23 };
18 24
19 struct MetricDetails { 25 const MetricDetails* GetMetricDetails(MetricType event_type);
20 MetricDetails();
21 MetricDetails(const std::string& metric_name,
22 const std::string& metric_description);
23 ~MetricDetails();
24
25 std::string name;
26 std::string description;
27 };
28 26
29 } // namespace performance_monitor 27 } // namespace performance_monitor
30 28
31 #endif // CHROME_BROWSER_PERFORMANCE_MONITOR_METRIC_DETAILS_H_ 29 #endif // CHROME_BROWSER_PERFORMANCE_MONITOR_METRIC_DETAILS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698