| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 IOS_CHROME_BROWSER_UI_WEBUI_HISTORY_METRICS_HANDLER_H_ | 5 #ifndef IOS_CHROME_BROWSER_UI_WEBUI_HISTORY_METRICS_HANDLER_H_ |
| 6 #define IOS_CHROME_BROWSER_UI_WEBUI_HISTORY_METRICS_HANDLER_H_ | 6 #define IOS_CHROME_BROWSER_UI_WEBUI_HISTORY_METRICS_HANDLER_H_ |
| 7 | 7 |
| 8 #include "base/compiler_specific.h" | 8 #include "base/compiler_specific.h" |
| 9 #include "base/macros.h" | 9 #include "base/macros.h" |
| 10 #include "ios/public/provider/web/web_ui_ios_message_handler.h" | 10 #include "ios/web/public/webui/web_ui_ios_message_handler.h" |
| 11 | 11 |
| 12 /////////////////////////////////////////////////////////////////////////////// | 12 /////////////////////////////////////////////////////////////////////////////// |
| 13 // MetricsHandler | 13 // MetricsHandler |
| 14 | 14 |
| 15 // Let the page contents record UMA actions. Only use when you can't do it from | 15 // Let the page contents record UMA actions. Only use when you can't do it from |
| 16 // C++. For example, we currently use it to let the NTP log the position of the | 16 // C++. For example, we currently use it to let the NTP log the position of the |
| 17 // Most Visited or Bookmark the user clicked on, as we don't get that | 17 // Most Visited or Bookmark the user clicked on, as we don't get that |
| 18 // information through RequestOpenURL. You will need to update the metrics | 18 // information through RequestOpenURL. You will need to update the metrics |
| 19 // dashboard with the action names you use, as our processor won't catch that | 19 // dashboard with the action names you use, as our processor won't catch that |
| 20 // information (treat it as RecordComputedMetrics) | 20 // information (treat it as RecordComputedMetrics) |
| (...skipping 21 matching lines...) Expand all Loading... |
| 42 // and the maximum allowed value, which can be at most 4000. The histogram | 42 // and the maximum allowed value, which can be at most 4000. The histogram |
| 43 // will use at most 100 buckets, one for each 1, 10, or 100 different values, | 43 // will use at most 100 buckets, one for each 1, 10, or 100 different values, |
| 44 // depending on the maximum value. | 44 // depending on the maximum value. |
| 45 void HandleRecordInHistogram(const base::ListValue* args); | 45 void HandleRecordInHistogram(const base::ListValue* args); |
| 46 | 46 |
| 47 private: | 47 private: |
| 48 DISALLOW_COPY_AND_ASSIGN(MetricsHandler); | 48 DISALLOW_COPY_AND_ASSIGN(MetricsHandler); |
| 49 }; | 49 }; |
| 50 | 50 |
| 51 #endif // IOS_CHROME_BROWSER_UI_WEBUI_HISTORY_METRICS_HANDLER_H_ | 51 #endif // IOS_CHROME_BROWSER_UI_WEBUI_HISTORY_METRICS_HANDLER_H_ |
| OLD | NEW |