Commit 6d8914ed authored by Cooper Knaak's avatar Cooper Knaak Committed by Commit Bot

[iOS] Notify FeatureEngagementTracker of Viewed Reading List Event

This CL sends a notification to the FeatureEngagementTracker when the
user opens their reading list. The event call was added to
ReadingListCoordinator because it handles the final step in actually
presenting the reading list. Although there is currently only one
entry point for the reading list, potential future entry points will
still use the ReadingListCoordinator, therefore still triggering the
event.

R=edchin@chromium.org, gchatz@chromium.org

Bug: 738164
Change-Id: I15d9ad7a79b070cb78511873cbecf86d73b05a2d
Reviewed-on: https://chromium-review.googlesource.com/562640Reviewed-by: default avatarGregory Chatzinoff <gchatz@chromium.org>
Reviewed-by: default avatarEd Chin <edchin@chromium.org>
Reviewed-by: default avatarEric Noyau <noyau@chromium.org>
Commit-Queue: Cooper Knaak <cooperknaak@google.com>
Cr-Commit-Position: refs/heads/master@{#485803}
parent 7a4f2242
......@@ -24,6 +24,7 @@ source_set("reading_list") {
":reading_list_ui",
"//base",
"//components/favicon/core",
"//components/feature_engagement_tracker",
"//components/reading_list/core",
"//components/reading_list/ios",
"//components/url_formatter",
......@@ -31,6 +32,7 @@ source_set("reading_list") {
"//ios/chrome/browser",
"//ios/chrome/browser/browser_state",
"//ios/chrome/browser/favicon",
"//ios/chrome/browser/feature_engagement_tracker",
"//ios/chrome/browser/reading_list",
"//ios/chrome/browser/ui",
"//ios/chrome/browser/ui/alert_coordinator",
......
......@@ -8,9 +8,12 @@
#include "base/metrics/histogram_macros.h"
#include "base/metrics/user_metrics.h"
#include "base/metrics/user_metrics_action.h"
#include "components/feature_engagement_tracker/public/event_constants.h"
#include "components/feature_engagement_tracker/public/feature_engagement_tracker.h"
#include "components/reading_list/core/reading_list_model.h"
#include "ios/chrome/browser/browser_state/chrome_browser_state.h"
#include "ios/chrome/browser/favicon/ios_chrome_large_icon_service_factory.h"
#include "ios/chrome/browser/feature_engagement_tracker/feature_engagement_tracker_factory.h"
#include "ios/chrome/browser/reading_list/offline_url_utils.h"
#include "ios/chrome/browser/reading_list/reading_list_download_service.h"
#include "ios/chrome/browser/reading_list/reading_list_download_service_factory.h"
......@@ -111,6 +114,11 @@ enum UMAContextMenuAction {
[self.baseViewController presentViewController:self.containerViewController
animated:YES
completion:nil];
// Send the "Viewed Reading List" event to the FeatureEngagementTracker when
// the user opens their reading list.
FeatureEngagementTrackerFactory::GetForBrowserState(self.browserState)
->NotifyEvent(feature_engagement_tracker::events::kViewedReadingList);
}
- (void)stop {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment