Index: chrome/browser/ui/cocoa/bookmarks/bookmark_menu_bridge.mm |
diff --git a/chrome/browser/ui/cocoa/bookmarks/bookmark_menu_bridge.mm b/chrome/browser/ui/cocoa/bookmarks/bookmark_menu_bridge.mm |
index 00915f8ec7725baf5d2c33df3e5ed70a012b397c..ef810682151951e6a12aa6f6c100fc459b722c89 100644 |
--- a/chrome/browser/ui/cocoa/bookmarks/bookmark_menu_bridge.mm |
+++ b/chrome/browser/ui/cocoa/bookmarks/bookmark_menu_bridge.mm |
@@ -74,13 +74,14 @@ void BookmarkMenuBridge::UpdateMenuInternal(NSMenu* bookmark_menu, |
ClearBookmarkMenu(bookmark_menu); |
- // Add at most one separator for the bookmark bar and the managed bookmarks |
- // folder. |
+ // Add at most one separator for the bookmark bar and the managed and |
+ // supervised bookmarks folders. |
ChromeBookmarkClient* client = |
ChromeBookmarkClientFactory::GetForProfile(profile_); |
const BookmarkNode* barNode = model->bookmark_bar_node(); |
const BookmarkNode* managedNode = client->managed_node(); |
- if (!barNode->empty() || !managedNode->empty()) |
+ const BookmarkNode* supervisedNode = client->supervised_node(); |
+ if (!barNode->empty() || !managedNode->empty() || !supervisedNode->empty()) |
[bookmark_menu addItem:[NSMenuItem separatorItem]]; |
if (!managedNode->empty()) { |
// Most users never see this node, so the image is only loaded if needed. |
@@ -89,6 +90,13 @@ void BookmarkMenuBridge::UpdateMenuInternal(NSMenu* bookmark_menu, |
rb.GetNativeImageNamed(IDR_BOOKMARK_BAR_FOLDER_MANAGED).ToNSImage(); |
AddNodeAsSubmenu(bookmark_menu, managedNode, image, !is_submenu); |
} |
+ if (!supervisedNode->empty()) { |
+ // Most users never see this node, so the image is only loaded if needed. |
+ ResourceBundle& rb = ResourceBundle::GetSharedInstance(); |
+ NSImage* image = |
+ rb.GetNativeImageNamed(IDR_BOOKMARK_BAR_FOLDER_SUPERVISED).ToNSImage(); |
+ AddNodeAsSubmenu(bookmark_menu, supervisedNode, image, !is_submenu); |
+ } |
if (!barNode->empty()) |
AddNodeToMenu(barNode, bookmark_menu, !is_submenu); |