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

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

Issue 2789433006: Implement request mobile site. (Closed)
Patch Set: Fix failing eg tests on iPad. Created 3 years, 8 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_model.mm
diff --git a/ios/chrome/browser/ui/tools_menu/tools_menu_model.mm b/ios/chrome/browser/ui/tools_menu/tools_menu_model.mm
index 6dc52d148e4082b694783025ed5aca32548795fb..9a0ebd1ab15af700b6418f0183475e6d88113660 100644
--- a/ios/chrome/browser/ui/tools_menu/tools_menu_model.mm
+++ b/ios/chrome/browser/ui/tools_menu/tools_menu_model.mm
@@ -15,10 +15,6 @@
#import "ios/public/provider/chrome/browser/user_feedback/user_feedback_provider.h"
#include "ios/web/public/user_agent.h"
-// TODO(crbug.com/678047) Remove this switch when request mobile site
-// functionality is implemented.
-#define HIDE_REQUEST_MOBILE_SITE_CELL
-
// Menu items can be marked as visible or not when Incognito is enabled.
// The following bits are used for |visibility| field in |MenuItemInfo|.
const NSInteger kVisibleIncognitoOnly = 1 << 0;
@@ -64,6 +60,9 @@
{ IDS_IOS_TOOLS_MENU_REQUEST_DESKTOP_SITE, kToolsMenuRequestDesktopId,
IDC_REQUEST_DESKTOP_SITE, ToolbarTypeWebAll,
0, nil },
+ { IDS_IOS_TOOLS_MENU_REQUEST_MOBILE_SITE, kToolsMenuRequestMobileId,
+ IDC_REQUEST_MOBILE_SITE, ToolbarTypeWebAll,
+ 0, nil },
{ IDS_IOS_TOOLS_MENU_READER_MODE, kToolsMenuReaderMode,
IDC_READER_MODE, ToolbarTypeWebAll,
0, nil },
@@ -104,19 +103,9 @@ bool ToolsMenuItemShouldBeVisible(const MenuItemInfo& item,
// flag should stick when going backward and which cell should be visible
// when navigating to native pages).
case IDS_IOS_TOOLS_MENU_REQUEST_DESKTOP_SITE:
-#ifdef HIDE_REQUEST_MOBILE_SITE_CELL
- return true;
-#else
return (configuration.userAgentType != web::UserAgentType::DESKTOP);
-#endif
case IDS_IOS_TOOLS_MENU_REQUEST_MOBILE_SITE:
-// TODO(crbug.com/678047) Remove this switch when request mobile site
-// functionality is implemented.
-#ifdef HIDE_REQUEST_MOBILE_SITE_CELL
- return false;
-#else
return (configuration.userAgentType == web::UserAgentType::DESKTOP);
-#endif
default:
return true;
}
« no previous file with comments | « ios/chrome/browser/ui/tools_menu/tools_menu_model.h ('k') | ios/chrome/browser/ui/tools_menu/tools_menu_view_controller.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698