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

Unified Diff: chrome/browser/browser.cc

Issue 3191007: Land 3122014 for Anton: Initial change that allows to disable bookmarks (Closed) Base URL: http://src.chromium.org/git/chromium.git
Patch Set: Comments resolved Created 10 years, 4 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/app/chrome_dll_main.cc ('k') | chrome/browser/defaults.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/browser.cc
diff --git a/chrome/browser/browser.cc b/chrome/browser/browser.cc
index ac91d862548d906c61661d1a34c4b198e07a691b..6981a1dec76e705b706fa081eb44a74068a86257 100644
--- a/chrome/browser/browser.cc
+++ b/chrome/browser/browser.cc
@@ -1091,7 +1091,8 @@ void Browser::UpdateCommandsForFullscreenMode(bool is_fullscreen) {
// Show various bits of UI
command_updater_.UpdateCommandEnabled(IDC_DEVELOPER_MENU, show_main_ui);
command_updater_.UpdateCommandEnabled(IDC_REPORT_BUG, show_main_ui);
- command_updater_.UpdateCommandEnabled(IDC_SHOW_BOOKMARK_BAR, show_main_ui);
+ command_updater_.UpdateCommandEnabled(IDC_SHOW_BOOKMARK_BAR,
+ browser_defaults::bookmarks_enabled && show_main_ui);
command_updater_.UpdateCommandEnabled(IDC_IMPORT_SETTINGS, show_main_ui);
command_updater_.UpdateCommandEnabled(IDC_SYNC_BOOKMARKS,
show_main_ui && profile_->IsSyncAccessible());
@@ -3246,7 +3247,8 @@ void Browser::InitCommandState() {
command_updater_.UpdateCommandEnabled(IDC_DEV_TOOLS_INSPECT, true);
command_updater_.UpdateCommandEnabled(IDC_TASK_MANAGER, true);
command_updater_.UpdateCommandEnabled(IDC_SHOW_HISTORY, true);
- command_updater_.UpdateCommandEnabled(IDC_SHOW_BOOKMARK_MANAGER, true);
+ command_updater_.UpdateCommandEnabled(IDC_SHOW_BOOKMARK_MANAGER,
+ browser_defaults::bookmarks_enabled);
command_updater_.UpdateCommandEnabled(IDC_SHOW_DOWNLOADS, true);
command_updater_.UpdateCommandEnabled(IDC_HELP_PAGE, true);
command_updater_.UpdateCommandEnabled(IDC_IMPORT_SETTINGS, true);
@@ -3292,7 +3294,8 @@ void Browser::InitCommandState() {
#endif
// Page-related commands
- command_updater_.UpdateCommandEnabled(IDC_BOOKMARK_PAGE, normal_window);
+ command_updater_.UpdateCommandEnabled(IDC_BOOKMARK_PAGE,
+ browser_defaults::bookmarks_enabled && normal_window);
// Clipboard commands
command_updater_.UpdateCommandEnabled(IDC_COPY_URL, non_devtools_window);
@@ -3339,7 +3342,7 @@ void Browser::UpdateCommandsForTabState() {
// Page-related commands
window_->SetStarredState(current_tab->is_starred());
command_updater_.UpdateCommandEnabled(IDC_BOOKMARK_ALL_TABS,
- CanBookmarkAllTabs());
+ browser_defaults::bookmarks_enabled && CanBookmarkAllTabs());
command_updater_.UpdateCommandEnabled(IDC_VIEW_SOURCE,
current_tab->controller().CanViewSource());
// Instead of using GetURL here, we use url() (which is the "real" url of the
« no previous file with comments | « chrome/app/chrome_dll_main.cc ('k') | chrome/browser/defaults.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698