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

Unified Diff: ios/chrome/browser/ui/sad_tab/sad_tab_view.mm

Issue 2869223002: Metrics logging for user engagement of the Reload and Feedback buttons (Closed)
Patch Set: Created 3 years, 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ios/chrome/browser/ui/sad_tab/sad_tab_view.mm
diff --git a/ios/chrome/browser/ui/sad_tab/sad_tab_view.mm b/ios/chrome/browser/ui/sad_tab/sad_tab_view.mm
index ac2fc8a36cb6f9e02791d2df7247f4c3abae99db..c3c18ce555bd5a6d8de28b1d0964d620ef840b57 100644
--- a/ios/chrome/browser/ui/sad_tab/sad_tab_view.mm
+++ b/ios/chrome/browser/ui/sad_tab/sad_tab_view.mm
@@ -4,6 +4,7 @@
#import "ios/chrome/browser/ui/sad_tab/sad_tab_view.h"
+#include "base/metrics/histogram_macros.h"
#include "base/strings/sys_string_conversions.h"
#include "components/grit/components_scaled_resources.h"
#include "components/strings/grit/components_strings.h"
@@ -117,6 +118,15 @@ NSString* const kMessageLabelBulletRTLFormat = @"\u202E%@\u202C";
@end
+// An enum for reporting interaction events to a UMA histogram. This
+// enumeration mimics that at sad_tab.cc
+typedef NS_ENUM(NSInteger, SadTabViewEvent) {
PL 2017/05/09 22:38:23 This enumeration copies one reporting this metric
Eugene But (OOO till 7-30) 2017/05/09 22:45:58 I think it is C :). We should find a common place
PL 2017/05/09 22:57:20 Thanks! Reached out to isherman@ and sdy@ for disc
+ SadTabViewEventDisplayed = 0,
+ SadTabViewEventButtonClicked,
+ SadTabViewEventHelpLinkClicked,
+ SadTabViewEventMaxSadTabEvent,
+};
+
#pragma mark - SadTabView
@implementation SadTabView
@@ -523,9 +533,15 @@ NSString* const kMessageLabelBulletRTLFormat = @"\u202E%@\u202C";
- (void)handleActionButtonTapped:(id)sender {
switch (self.mode) {
case SadTabViewMode::RELOAD:
+ UMA_HISTOGRAM_ENUMERATION("Tabs.SadTab.Reload.Event",
+ SadTabViewEventButtonClicked,
+ SadTabViewEventMaxSadTabEvent);
self.navigationManager->Reload(web::ReloadType::NORMAL, true);
break;
case SadTabViewMode::FEEDBACK: {
+ UMA_HISTOGRAM_ENUMERATION("Tabs.SadTab.Feedback.Event",
+ SadTabViewEventButtonClicked,
+ SadTabViewEventMaxSadTabEvent);
GenericChromeCommand* command =
[[GenericChromeCommand alloc] initWithTag:IDC_REPORT_AN_ISSUE];
[self chromeExecuteCommand:command];
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698