Commit a0b95a6e authored by adamta's avatar adamta Committed by Commit Bot

[iOS] New URL for Discover feed menu 'Learn More' item

Adds URL for 'Learn More' item in the NTP' Discover feed header menu.

Bug: 1111837, 1085419
Change-Id: If0bd7519f213cfb0667fe67c962d6d9ceef1d62b
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2367732Reviewed-by: default avatarSergio Collazos <sczs@chromium.org>
Commit-Queue: Adam Trudeau-Arcaro <adamta@google.com>
Cr-Commit-Position: refs/heads/master@{#800308}
parent 27be7936
...@@ -35,10 +35,15 @@ ...@@ -35,10 +35,15 @@
- (void)handlePromoTapped; - (void)handlePromoTapped;
// Handles the actions following a tap on the "Learn more" item. // Handles the actions following a tap on the "Learn more" item.
- (void)handleLearnMoreTapped; - (void)handleLearnMoreTapped;
// Handles the actions following a tap on the "Manage Activity" item. // Handles the actions following a tap on the "Manage Activity" item in the
- (void)handleManageActivityTapped; // Discover feed menu.
// Handles the actions following a tap on the "Manage Interests" item. - (void)handleFeedManageActivityTapped;
- (void)handleManageInterestsTapped; // Handles the actions following a tap on the "Manage Interests" item in the
// Discover feed menu.
- (void)handleFeedManageInterestsTapped;
// Handles the actions following a tap on the "Learn More" item in the Discover
// feed menu.
- (void)handleFeedLearnMoreTapped;
@end @end
......
...@@ -457,7 +457,7 @@ ...@@ -457,7 +457,7 @@
addItemWithTitle:l10n_util::GetNSString( addItemWithTitle:l10n_util::GetNSString(
IDS_IOS_DISCOVER_FEED_MENU_MANAGE_ACTIVITY_ITEM) IDS_IOS_DISCOVER_FEED_MENU_MANAGE_ACTIVITY_ITEM)
action:^{ action:^{
[weakSelf.NTPMediator handleManageActivityTapped]; [weakSelf.NTPMediator handleFeedManageActivityTapped];
} }
style:UIAlertActionStyleDefault]; style:UIAlertActionStyleDefault];
...@@ -465,7 +465,7 @@ ...@@ -465,7 +465,7 @@
addItemWithTitle:l10n_util::GetNSString( addItemWithTitle:l10n_util::GetNSString(
IDS_IOS_DISCOVER_FEED_MENU_MANAGE_INTERESTS_ITEM) IDS_IOS_DISCOVER_FEED_MENU_MANAGE_INTERESTS_ITEM)
action:^{ action:^{
[weakSelf.NTPMediator handleManageInterestsTapped]; [weakSelf.NTPMediator handleFeedManageInterestsTapped];
} }
style:UIAlertActionStyleDefault]; style:UIAlertActionStyleDefault];
} }
...@@ -474,7 +474,7 @@ ...@@ -474,7 +474,7 @@
addItemWithTitle:l10n_util::GetNSString( addItemWithTitle:l10n_util::GetNSString(
IDS_IOS_DISCOVER_FEED_MENU_LEARN_MORE_ITEM) IDS_IOS_DISCOVER_FEED_MENU_LEARN_MORE_ITEM)
action:^{ action:^{
[weakSelf.NTPMediator handleLearnMoreTapped]; [weakSelf.NTPMediator handleFeedLearnMoreTapped];
} }
style:UIAlertActionStyleDefault]; style:UIAlertActionStyleDefault];
[self.alertCoordinator start]; [self.alertCoordinator start];
......
...@@ -71,6 +71,9 @@ const char kFeedManageActivityURL[] = ...@@ -71,6 +71,9 @@ const char kFeedManageActivityURL[] =
// URL for 'Manage Interests' item in the Discover feed menu. // URL for 'Manage Interests' item in the Discover feed menu.
const char kFeedManageInterestsURL[] = const char kFeedManageInterestsURL[] =
"https://google.com/preferences/interests"; "https://google.com/preferences/interests";
// URL for 'Learn More' item in the Discover feed menu;
const char kFeedLearnMoreURL[] = "https://support.google.com/chrome/"
"?p=new_tab&co=GENIE.Platform%3DiOS&oco=1";
// URL for the page displaying help for the NTP. // URL for the page displaying help for the NTP.
const char kNTPHelpURL[] = const char kNTPHelpURL[] =
"https://support.google.com/chrome/?p=ios_new_tab&ios=1"; "https://support.google.com/chrome/?p=ios_new_tab&ios=1";
...@@ -403,16 +406,21 @@ const char kNTPHelpURL[] = ...@@ -403,16 +406,21 @@ const char kNTPHelpURL[] =
// TODO(crbug.com/1085419): Add metrics. // TODO(crbug.com/1085419): Add metrics.
} }
- (void)handleManageActivityTapped { - (void)handleFeedManageActivityTapped {
[self openMenuItemWebPage:GURL(kFeedManageActivityURL)]; [self openMenuItemWebPage:GURL(kFeedManageActivityURL)];
} }
- (void)handleManageInterestsTapped { - (void)handleFeedManageInterestsTapped {
[self openMenuItemWebPage:GURL(kFeedManageInterestsURL)]; [self openMenuItemWebPage:GURL(kFeedManageInterestsURL)];
} }
- (void)handleFeedLearnMoreTapped {
[self openMenuItemWebPage:GURL(kFeedLearnMoreURL)];
}
- (void)handleLearnMoreTapped { - (void)handleLearnMoreTapped {
[self openMenuItemWebPage:GURL(kNTPHelpURL)]; [self openMenuItemWebPage:GURL(kNTPHelpURL)];
[self.NTPMetrics recordAction:new_tab_page_uma::ACTION_OPENED_LEARN_MORE];
} }
#pragma mark - ContentSuggestionsGestureCommands #pragma mark - ContentSuggestionsGestureCommands
......
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