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

Unified Diff: chrome/browser/ui/cocoa/bookmarks/bookmark_bar_controller.mm

Issue 332443004: Updated menu to hide the Managed Bookmarks to follow the folder's name. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 6 years, 6 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: chrome/browser/ui/cocoa/bookmarks/bookmark_bar_controller.mm
diff --git a/chrome/browser/ui/cocoa/bookmarks/bookmark_bar_controller.mm b/chrome/browser/ui/cocoa/bookmarks/bookmark_bar_controller.mm
index 2b2f2c63f91b704b040cea8b187ee1f2fb72a941..77d8ba115eb0b68db5053f30f785b4080cee8664 100644
--- a/chrome/browser/ui/cocoa/bookmarks/bookmark_bar_controller.mm
+++ b/chrome/browser/ui/cocoa/bookmarks/bookmark_bar_controller.mm
@@ -1224,7 +1224,16 @@ void RecordAppLaunch(Profile* profile, GURL url) {
// Creates the button for "Managed Bookmarks", but does not position it.
- (void)createManagedBookmarksButton {
if (managedBookmarksButton_.get()) {
+ // The node's title might have changed if the user signed in or out.
+ // Make sure it's up to date now.
+ const BookmarkNode* node = bookmarkClient_->managed_node();
+ NSString* title = base::SysUTF16ToNSString(node->GetTitle());
+ NSCell* cell = [managedBookmarksButton_ cell];
+ [cell setTitle:title];
+
+ // Its visibility may have changed too.
[self setManagedBookmarksButtonVisibility];
+
return;
}

Powered by Google App Engine
This is Rietveld 408576698