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

Unified Diff: chrome/browser/ui/toolbar/wrench_menu_model.cc

Issue 161293002: mac: Allows extensions to hide the bookmark page menu item. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove unused headers. Created 6 years, 10 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/toolbar/wrench_menu_model.cc
diff --git a/chrome/browser/ui/toolbar/wrench_menu_model.cc b/chrome/browser/ui/toolbar/wrench_menu_model.cc
index 96f205623fe688c3b65a9af821cb679bc1e94f66..0104615b381d198c94cc57b0b8efec57b30c1e14 100644
--- a/chrome/browser/ui/toolbar/wrench_menu_model.cc
+++ b/chrome/browser/ui/toolbar/wrench_menu_model.cc
@@ -22,6 +22,7 @@
#include "chrome/browser/signin/signin_manager_factory.h"
#include "chrome/browser/signin/signin_ui_util.h"
#include "chrome/browser/task_manager/task_manager.h"
+#include "chrome/browser/ui/bookmarks/bookmark_utils.h"
#include "chrome/browser/ui/browser.h"
#include "chrome/browser/ui/browser_commands.h"
#include "chrome/browser/ui/browser_finder.h"
@@ -422,6 +423,11 @@ bool WrenchMenuModel::IsCommandIdVisible(int command_id) const {
} else if (command_id == IDC_UPGRADE_DIALOG) {
return UpgradeDetector::GetInstance()->notify_upgrade();
}
+
+ // Extensions have the ability to hide the bookmark page menu item.
+ if (command_id == IDC_BOOKMARK_PAGE)
+ return chrome::ShouldShowBookmarkPageMenuItem(browser_->profile());
+
return true;
}

Powered by Google App Engine
This is Rietveld 408576698