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

Unified Diff: chrome/browser/ui/views/wrench_menu.cc

Issue 7076027: Couple more wrench menu issues. The patch I sent around a couple of (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Makes unit test compile Created 9 years, 7 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
« no previous file with comments | « chrome/browser/ui/views/bookmarks/bookmark_menu_delegate.cc ('k') | views/controls/menu/menu_controller.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/views/wrench_menu.cc
diff --git a/chrome/browser/ui/views/wrench_menu.cc b/chrome/browser/ui/views/wrench_menu.cc
index b7d453c48086660f1fe61e73ed1a93385885a922..7b5e5ce00893cf891c911b9c7398cb9e02a2358e 100644
--- a/chrome/browser/ui/views/wrench_menu.cc
+++ b/chrome/browser/ui/views/wrench_menu.cc
@@ -693,7 +693,7 @@ int WrenchMenu::GetMaxWidthForMenu(MenuItemView* menu) {
}
bool WrenchMenu::IsItemChecked(int id) const {
- if (!is_bookmark_command(id))
+ if (is_bookmark_command(id))
return false;
const Entry& entry = id_to_entry_.find(id)->second;
@@ -762,7 +762,9 @@ void WrenchMenu::WillShowMenu(MenuItemView* menu) {
}
void WrenchMenu::BookmarkModelChanged() {
- root_->Cancel();
+ DCHECK(bookmark_menu_delegate_.get());
+ if (!bookmark_menu_delegate_->is_mutating_model())
+ root_->Cancel();
}
WrenchMenu::~WrenchMenu() {
« no previous file with comments | « chrome/browser/ui/views/bookmarks/bookmark_menu_delegate.cc ('k') | views/controls/menu/menu_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698