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

Unified Diff: ios/chrome/browser/ui/tools_menu/tools_menu_view_controller.mm

Issue 2643753002: Add the suggestions UI in chrome (Closed)
Patch Set: Update comments 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
Index: ios/chrome/browser/ui/tools_menu/tools_menu_view_controller.mm
diff --git a/ios/chrome/browser/ui/tools_menu/tools_menu_view_controller.mm b/ios/chrome/browser/ui/tools_menu/tools_menu_view_controller.mm
index e01c61f959c5780c155f6c46bedb653c18b2d3ff..f05adfdef1e157d18b930e2e00a4dd7588daa96f 100644
--- a/ios/chrome/browser/ui/tools_menu/tools_menu_view_controller.mm
+++ b/ios/chrome/browser/ui/tools_menu/tools_menu_view_controller.mm
@@ -52,6 +52,7 @@ NSString* const kToolsMenuReaderMode = @"kToolsMenuReaderMode";
NSString* const kToolsMenuRequestDesktopId = @"kToolsMenuRequestDesktopId";
NSString* const kToolsMenuSettingsId = @"kToolsMenuSettingsId";
NSString* const kToolsMenuHelpId = @"kToolsMenuHelpId";
+NSString* const kToolsMenuSuggestionsId = @"kToolsMenuSuggestionsId";
namespace {
@@ -119,6 +120,9 @@ static MenuItemInfo itemInfoList[] = {
{ IDS_IOS_TOOLS_MENU_READING_LIST, kToolsMenuReadingListId,
IDC_SHOW_READING_LIST, kToolbarTypeWebAll,
0, [ReadingListMenuViewItem class] },
+ { IDS_IOS_TOOLS_MENU_SUGGESTIONS, kToolsMenuSuggestionsId,
+ IDC_SHOW_SUGGESTIONS, kToolbarTypeWebAll,
+ 0, nil },
{ IDS_IOS_TOOLS_MENU_RECENT_TABS, kToolsMenuOtherDevicesId,
IDC_SHOW_OTHER_DEVICES, kToolbarTypeWebAll,
kVisibleNotIncognitoOnly, nil },
@@ -176,6 +180,12 @@ NS_INLINE BOOL ItemShouldBeVisible(const MenuItemInfo& item,
}
}
+ if (item.title_id == IDS_IOS_TOOLS_MENU_SUGGESTIONS) {
+ if (!experimental_flags::IsSuggestionsUIEnabled()) {
+ return NO;
+ }
+ }
+
if (item.title_id == IDS_IOS_OPTIONS_REPORT_AN_ISSUE) {
if (!ios::GetChromeBrowserProvider()
->GetUserFeedbackProvider()

Powered by Google App Engine
This is Rietveld 408576698