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

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: Migrating Desktop to use shared symbols, explicitly setting enum values" 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
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..74486764e832460c458d7ae0ae52bee64ca61512 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"
@@ -20,6 +21,7 @@
#import "ios/third_party/material_roboto_font_loader_ios/src/src/MaterialRobotoFontLoader.h"
#include "ios/web/public/navigation_manager.h"
#include "ui/base/l10n/l10n_util.h"
+#include "ui/base/ui_metrics_types.h"
#include "url/gurl.h"
#if !defined(__has_feature) || !__has_feature(objc_arc)
@@ -523,9 +525,15 @@ NSString* const kMessageLabelBulletRTLFormat = @"\u202E%@\u202C";
- (void)handleActionButtonTapped:(id)sender {
switch (self.mode) {
case SadTabViewMode::RELOAD:
+ UMA_HISTOGRAM_ENUMERATION(ui::kSadTabReloadHistogramKey,
+ ui::SadTabEvent::SAD_TAB_EVENT_BUTTON_CLICKED,
+ ui::SadTabEvent::SAD_TAB_EVENT_MAX);
self.navigationManager->Reload(web::ReloadType::NORMAL, true);
break;
case SadTabViewMode::FEEDBACK: {
+ UMA_HISTOGRAM_ENUMERATION(ui::kSadTabFeedbackHistogramKey,
+ ui::SadTabEvent::SAD_TAB_EVENT_BUTTON_CLICKED,
+ ui::SadTabEvent::SAD_TAB_EVENT_MAX);
GenericChromeCommand* command =
[[GenericChromeCommand alloc] initWithTag:IDC_REPORT_AN_ISSUE];
[self chromeExecuteCommand:command];
« no previous file with comments | « chrome/browser/ui/sad_tab.cc ('k') | ui/base/BUILD.gn » ('j') | ui/base/ui_metrics_types.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698