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

Side by Side Diff: ios/chrome/browser/ui/tools_menu/tools_menu_model.mm

Issue 2722693002: [ios] Creates ToolsMenuConstants file (Closed)
Patch Set: Created 3 years, 9 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 unified diff | Download patch
OLDNEW
1 // Copyright 2017 The Chromium Authors. All rights reserved. 1 // Copyright 2017 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "ios/chrome/browser/ui/tools_menu/tools_menu_model.h" 5 #include "ios/chrome/browser/ui/tools_menu/tools_menu_model.h"
6 6
7 #include "components/reading_list/core/reading_list_switches.h" 7 #include "components/reading_list/core/reading_list_switches.h"
8 #include "components/strings/grit/components_strings.h" 8 #include "components/strings/grit/components_strings.h"
9 #include "ios/chrome/browser/experimental_flags.h" 9 #include "ios/chrome/browser/experimental_flags.h"
10 #include "ios/chrome/browser/ui/commands/ios_command_ids.h" 10 #include "ios/chrome/browser/ui/commands/ios_command_ids.h"
11 #import "ios/chrome/browser/ui/tools_menu/reading_list_menu_view_item.h" 11 #import "ios/chrome/browser/ui/tools_menu/reading_list_menu_view_item.h"
12 #include "ios/chrome/browser/ui/tools_menu/tools_menu_constants.h"
12 #include "ios/chrome/browser/ui/ui_util.h" 13 #include "ios/chrome/browser/ui/ui_util.h"
13 #include "ios/chrome/grit/ios_strings.h" 14 #include "ios/chrome/grit/ios_strings.h"
14 #include "ios/public/provider/chrome/browser/chrome_browser_provider.h" 15 #include "ios/public/provider/chrome/browser/chrome_browser_provider.h"
15 #import "ios/public/provider/chrome/browser/user_feedback/user_feedback_provider .h" 16 #import "ios/public/provider/chrome/browser/user_feedback/user_feedback_provider .h"
16 17
17 // Menu items can be marked as visible or not when Incognito is enabled. 18 // Menu items can be marked as visible or not when Incognito is enabled.
18 // The following bits are used for |visibility| field in |MenuItemInfo|. 19 // The following bits are used for |visibility| field in |MenuItemInfo|.
19 const NSInteger kVisibleIncognitoOnly = 1 << 0; 20 const NSInteger kVisibleIncognitoOnly = 1 << 0;
20 const NSInteger kVisibleNotIncognitoOnly = 1 << 1; 21 const NSInteger kVisibleNotIncognitoOnly = 1 << 1;
21 22
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
86 switch (item.title_id) { 87 switch (item.title_id) {
87 case IDS_IOS_TOOLBAR_SHOW_TABS: 88 case IDS_IOS_TOOLBAR_SHOW_TABS:
88 return IsIPadIdiom(); 89 return IsIPadIdiom();
89 case IDS_IOS_TOOLS_MENU_READER_MODE: 90 case IDS_IOS_TOOLS_MENU_READER_MODE:
90 return experimental_flags::IsReaderModeEnabled(); 91 return experimental_flags::IsReaderModeEnabled();
91 case IDS_IOS_TOOLS_MENU_READING_LIST: 92 case IDS_IOS_TOOLS_MENU_READING_LIST:
92 return reading_list::switches::IsReadingListEnabled(); 93 return reading_list::switches::IsReadingListEnabled();
93 case IDS_IOS_TOOLS_MENU_SUGGESTIONS: 94 case IDS_IOS_TOOLS_MENU_SUGGESTIONS:
94 return experimental_flags::IsSuggestionsUIEnabled(); 95 return experimental_flags::IsSuggestionsUIEnabled();
95 case IDS_IOS_OPTIONS_REPORT_AN_ISSUE: 96 case IDS_IOS_OPTIONS_REPORT_AN_ISSUE:
96 return !ios::GetChromeBrowserProvider() 97 return ios::GetChromeBrowserProvider()
edchin 2017/02/27 23:02:41 Can you explain this change?
sczs 2017/03/02 22:56:11 This is a bug I introduced when changing the if st
97 ->GetUserFeedbackProvider() 98 ->GetUserFeedbackProvider()
98 ->IsUserFeedbackEnabled(); 99 ->IsUserFeedbackEnabled();
99 default: 100 default:
100 return true; 101 return true;
101 } 102 }
102 } 103 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698