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

Side by Side Diff: ios/chrome/browser/ui/webui/history/metrics_handler.h

Issue 2494853003: Remove some unused history resources on iOS (Closed)
Patch Set: add back URL constants Created 4 years 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
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef IOS_CHROME_BROWSER_UI_WEBUI_HISTORY_METRICS_HANDLER_H_
6 #define IOS_CHROME_BROWSER_UI_WEBUI_HISTORY_METRICS_HANDLER_H_
7
8 #include "base/compiler_specific.h"
9 #include "base/macros.h"
10 #include "ios/web/public/webui/web_ui_ios_message_handler.h"
11
12 ///////////////////////////////////////////////////////////////////////////////
13 // MetricsHandler
14
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
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
19 // dashboard with the action names you use, as our processor won't catch that
20 // information (treat it as RecordComputedMetrics)
21
22 namespace base {
23 class ListValue;
24 }
25
26 class MetricsHandler : public web::WebUIIOSMessageHandler {
27 public:
28 MetricsHandler();
29 ~MetricsHandler() override;
30
31 // WebUIIOSMessageHandler implementation.
32 void RegisterMessages() override;
33
34 // Callback for the "metricsHandler:recordAction" message. This records a
35 // user action.
36 void HandleRecordAction(const base::ListValue* args);
37
38 // TODO(dbeam): http://crbug.com/104338
39
40 // Callback for the "metricsHandler:recordInHistogram" message. This records
41 // into a histogram. |args| contains the histogram name, the value to record,
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,
44 // depending on the maximum value.
45 void HandleRecordInHistogram(const base::ListValue* args);
46
47 private:
48 DISALLOW_COPY_AND_ASSIGN(MetricsHandler);
49 };
50
51 #endif // IOS_CHROME_BROWSER_UI_WEBUI_HISTORY_METRICS_HANDLER_H_
OLDNEW
« no previous file with comments | « ios/chrome/browser/ui/webui/history/history_ui.mm ('k') | ios/chrome/browser/ui/webui/history/metrics_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698