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

Unified Diff: ios/chrome/browser/ui/bookmarks/bookmark_menu_view.mm

Issue 2662473003: Removing "All Bookmarks" (Closed)
Patch Set: feedback 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/bookmarks/bookmark_menu_view.mm
diff --git a/ios/chrome/browser/ui/bookmarks/bookmark_menu_view.mm b/ios/chrome/browser/ui/bookmarks/bookmark_menu_view.mm
index bee854aeec5f5c32898e07f220afba19e70e08e4..680ec47291b6d8279f86e3431da38409916e5fc0 100644
--- a/ios/chrome/browser/ui/bookmarks/bookmark_menu_view.mm
+++ b/ios/chrome/browser/ui/bookmarks/bookmark_menu_view.mm
@@ -137,18 +137,12 @@ using bookmarks::BookmarkNode;
[[NSMutableArray alloc] init]);
[self.menuItems addObject:topSection];
- if (experimental_flags::IsAllBookmarksEnabled()) {
- // All Items is always visible.
- [topSection addObject:[BookmarkMenuItem allMenuItem]];
- }
- // Bookmarks Bar, Mobile Bookmarks and Other Bookmarks are special folders and
- // are shown at the top if they contain anything.
- if (!mobileBookmarks->empty() ||
- !experimental_flags::IsAllBookmarksEnabled()) {
- [topSection
- addObject:[BookmarkMenuItem folderMenuItemForNode:mobileBookmarks
- rootAncestor:mobileBookmarks]];
- }
+ // Mobile bookmark is shown even if empty.
+ [topSection
+ addObject:[BookmarkMenuItem folderMenuItemForNode:mobileBookmarks
+ rootAncestor:mobileBookmarks]];
+ // Bookmarks Bar and Other Bookmarks are special folders and are shown at the
+ // top if they contain anything.
if (!bookmarkBar->empty()) {
[topSection addObject:[BookmarkMenuItem folderMenuItemForNode:bookmarkBar
rootAncestor:bookmarkBar]];
@@ -268,15 +262,6 @@ using bookmarks::BookmarkNode;
return;
}
- if (node == self.primaryMenuItem.rootAncestor) {
- // The deleted node is the root node of the current selected folder. Move to
- // all items.
- self.primaryMenuItem = [BookmarkMenuItem allMenuItem];
- [self.delegate bookmarkMenuView:self selectedMenuItem:self.primaryMenuItem];
- [self reloadData];
- return;
- }
-
const BookmarkNode* root =
RootLevelFolderForNode(parentFolder, self.bookmarkModel);
@@ -400,8 +385,7 @@ using bookmarks::BookmarkNode;
shouldProcessInkTouchesAtTouchLocation:(CGPoint)location {
NSIndexPath* indexPath = [self.tableView indexPathForRowAtPoint:location];
BookmarkMenuItem* menuItem = [self menuItemAtIndexPath:indexPath];
- return menuItem.type == bookmarks::MenuItemAll ||
- menuItem.type == bookmarks::MenuItemFolder;
+ return menuItem.type == bookmarks::MenuItemFolder;
}
- (MDCInkView*)inkTouchController:(MDCInkTouchController*)inkTouchController
« no previous file with comments | « ios/chrome/browser/ui/bookmarks/bookmark_menu_item.mm ('k') | ios/chrome/browser/ui/bookmarks/bookmark_position_cache.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698