summaryrefslogtreecommitdiffstats
path: root/chrome/browser/app_controller_mac.mm
diff options
context:
space:
mode:
authormaf@chromium.org <maf@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-07-09 01:39:46 +0000
committermaf@chromium.org <maf@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-07-09 01:39:46 +0000
commit1937e963795613aaec5e8cb6ec25bb8745558d34 (patch)
treeefd7bf5538b0cd3391a004c4ac13ec8c070ea822 /chrome/browser/app_controller_mac.mm
parent3a95d11692d594cedaa312ee420189b13621038f (diff)
downloadchromium_src-1937e963795613aaec5e8cb6ec25bb8745558d34.zip
chromium_src-1937e963795613aaec5e8cb6ec25bb8745558d34.tar.gz
chromium_src-1937e963795613aaec5e8cb6ec25bb8745558d34.tar.bz2
Mac. Do not display "Other Bookmarks" folder or its preceding separator in any Bookmark menu if folder is empty.
Make BookmarkMenuBridge objects and BookMarkMenuCocoaController objects take the NSMenu at init time (BookmarkMenuCocoaController was unexpectedly hard-coded to hook onto the main menu bar Bookmarks menu as its delegate, causing previously mysterious sync problems and crashes). Luckily, testing the small menu item hiding fix revealed the pre-existing bug in BookMarkMenuCocoaController, so these are both going in together. R=sail@chromium.org BUG=88793,87193 Review URL: http://codereview.chromium.org/7237063 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@91935 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/app_controller_mac.mm')
-rw-r--r--chrome/browser/app_controller_mac.mm3
1 files changed, 2 insertions, 1 deletions
diff --git a/chrome/browser/app_controller_mac.mm b/chrome/browser/app_controller_mac.mm
index b1acdeb..61e8e09 100644
--- a/chrome/browser/app_controller_mac.mm
+++ b/chrome/browser/app_controller_mac.mm
@@ -461,7 +461,8 @@ void RecordLastRunAppBundlePath() {
// Rebuild the menus with the new profile.
lastProfile_ = profile;
- bookmarkMenuBridge_.reset(new BookmarkMenuBridge(lastProfile_));
+ bookmarkMenuBridge_.reset(new BookmarkMenuBridge(lastProfile_,
+ [[[NSApp mainMenu] itemWithTag:IDC_BOOKMARKS_MENU] submenu]));
bookmarkMenuBridge_->BuildMenu();
historyMenuBridge_.reset(new HistoryMenuBridge(lastProfile_));