Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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_UI_WEBUI_METRICS_HANDLER_H_ | 5 #ifndef CHROME_BROWSER_UI_WEBUI_METRICS_HANDLER_H_ |
| 6 #define CHROME_BROWSER_UI_WEBUI_METRICS_HANDLER_H_ | 6 #define CHROME_BROWSER_UI_WEBUI_METRICS_HANDLER_H_ |
| 7 | 7 |
| 8 #include "content/browser/webui/web_ui.h" | 8 #include "content/browser/webui/web_ui.h" |
| 9 | 9 |
| 10 /////////////////////////////////////////////////////////////////////////////// | 10 /////////////////////////////////////////////////////////////////////////////// |
| (...skipping 15 matching lines...) Expand all Loading... | |
| 26 MetricsHandler(); | 26 MetricsHandler(); |
| 27 virtual ~MetricsHandler(); | 27 virtual ~MetricsHandler(); |
| 28 | 28 |
| 29 // WebUIMessageHandler implementation. | 29 // WebUIMessageHandler implementation. |
| 30 virtual void RegisterMessages() OVERRIDE; | 30 virtual void RegisterMessages() OVERRIDE; |
| 31 | 31 |
| 32 // Callback for the "metricsHandler:recordAction" message. This records a | 32 // Callback for the "metricsHandler:recordAction" message. This records a |
| 33 // user action. | 33 // user action. |
| 34 void HandleRecordAction(const base::ListValue* args); | 34 void HandleRecordAction(const base::ListValue* args); |
| 35 | 35 |
| 36 // TODO(dbeam): Rename recordInHistgram to something less broad and more | |
|
Evan Stade
2011/11/15 17:45:19
move this comment into a bug report and just link
Dan Beam
2011/11/15 18:37:13
Done. http://crbug.com/104338
| |
| 37 // toward what it's actually doing (UMA_HISTOGRAM_ENUMERATIONs). Also, add a | |
| 38 // generic equivalent of UMA_HISTOGRAM_TIMES()/UMA_HISTOGRAM_COUNT() macros to | |
| 39 // de-couple from NTP and be able to do UMA easily with one chrome.send() from | |
| 40 // WebUI/JavaScript. After this is done, possibly move this a shared location. | |
| 41 | |
| 36 // Callback for the "metricsHandler:recordInHistogram" message. This records | 42 // Callback for the "metricsHandler:recordInHistogram" message. This records |
| 37 // into a histogram. |args| contains the histogram name, the value to record, | 43 // into a histogram. |args| contains the histogram name, the value to record, |
| 38 // and the maximum allowed value, which can be at most 4000. The histogram | 44 // and the maximum allowed value, which can be at most 4000. The histogram |
| 39 // will use at most 100 buckets, one for each 1, 10, or 100 different values, | 45 // will use at most 100 buckets, one for each 1, 10, or 100 different values, |
| 40 // depending on the maximum value. | 46 // depending on the maximum value. |
| 41 void HandleRecordInHistogram(const base::ListValue* args); | 47 void HandleRecordInHistogram(const base::ListValue* args); |
| 42 | 48 |
| 43 // Callback for the "metricsHandler:logEventTime" message. | 49 // Callback for the "metricsHandler:logEventTime" message. |
| 44 void HandleLogEventTime(const base::ListValue* args); | 50 void HandleLogEventTime(const base::ListValue* args); |
| 45 | 51 |
| 46 private: | 52 private: |
| 47 DISALLOW_COPY_AND_ASSIGN(MetricsHandler); | 53 DISALLOW_COPY_AND_ASSIGN(MetricsHandler); |
| 48 }; | 54 }; |
| 49 | 55 |
| 50 #endif // CHROME_BROWSER_UI_WEBUI_METRICS_HANDLER_H_ | 56 #endif // CHROME_BROWSER_UI_WEBUI_METRICS_HANDLER_H_ |
| OLD | NEW |