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

Unified Diff: ios/chrome/browser/ui/history/history_collection_view_controller.mm

Issue 2592843002: [ios] Adds history user action metrics (Closed)
Patch Set: Rebase Created 3 years, 11 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 | ios/chrome/browser/ui/history/history_panel_view_controller.mm » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ios/chrome/browser/ui/history/history_collection_view_controller.mm
diff --git a/ios/chrome/browser/ui/history/history_collection_view_controller.mm b/ios/chrome/browser/ui/history/history_collection_view_controller.mm
index b394babfd2cc973ee1b678c8312ec498cfa53a59..0bc1bfea868c09cf546df8df1743fee2bcffc923 100644
--- a/ios/chrome/browser/ui/history/history_collection_view_controller.mm
+++ b/ios/chrome/browser/ui/history/history_collection_view_controller.mm
@@ -12,6 +12,8 @@
#include "base/mac/foundation_util.h"
#import "base/mac/objc_property_releaser.h"
#include "base/mac/scoped_nsobject.h"
+#include "base/metrics/user_metrics.h"
+#include "base/metrics/user_metrics_action.h"
#include "base/strings/sys_string_conversions.h"
#include "base/strings/utf_string_conversions.h"
#include "components/browsing_data/core/history_notice_utils.h"
@@ -481,6 +483,12 @@ const CGFloat kSeparatorInset = 10;
HistoryEntryItem* item = base::mac::ObjCCastStrict<HistoryEntryItem>(
[self.collectionViewModel itemAtIndexPath:indexPath]);
[self openURL:item.URL];
+ if (self.isSearching) {
+ base::RecordAction(
+ base::UserMetricsAction("HistoryPage_SearchResultClick"));
+ } else {
+ base::RecordAction(base::UserMetricsAction("HistoryPage_EntryLinkClick"));
+ }
}
}
« no previous file with comments | « no previous file | ios/chrome/browser/ui/history/history_panel_view_controller.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698