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

Unified Diff: chrome/browser/browser.cc

Issue 3122014: Initial change that allows to disable bookmarks in Chrome for Chrome OS (BWSI... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: 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
Index: chrome/browser/browser.cc
===================================================================
--- chrome/browser/browser.cc (revision 56008)
+++ chrome/browser/browser.cc (working copy)
@@ -1090,7 +1090,14 @@
// Show various bits of UI
command_updater_.UpdateCommandEnabled(IDC_DEVELOPER_MENU, show_main_ui);
command_updater_.UpdateCommandEnabled(IDC_REPORT_BUG, show_main_ui);
+#if defined(OS_CHROMEOS)
+ command_updater_.UpdateCommandEnabled(
sky 2010/08/17 17:58:39 Slews of ifdefs like this make the code really har
Dmitry Polukhin 2010/08/18 08:37:51 I don't see "defaults::", I see only "browser_defa
+ IDC_SHOW_BOOKMARK_BAR,
+ show_main_ui && !CommandLine::ForCurrentProcess()->
+ HasSwitch(switches::kDisableBookmarks));
+#else
command_updater_.UpdateCommandEnabled(IDC_SHOW_BOOKMARK_BAR, show_main_ui);
+#endif
command_updater_.UpdateCommandEnabled(IDC_IMPORT_SETTINGS, show_main_ui);
command_updater_.UpdateCommandEnabled(IDC_SYNC_BOOKMARKS,
show_main_ui && profile_->IsSyncAccessible());
@@ -3241,7 +3248,14 @@
command_updater_.UpdateCommandEnabled(IDC_DEV_TOOLS_INSPECT, true);
command_updater_.UpdateCommandEnabled(IDC_TASK_MANAGER, true);
command_updater_.UpdateCommandEnabled(IDC_SHOW_HISTORY, true);
+#if defined(OS_CHROMEOS)
+ command_updater_.UpdateCommandEnabled(
+ IDC_SHOW_BOOKMARK_MANAGER,
+ !CommandLine::ForCurrentProcess()->
+ HasSwitch(switches::kDisableBookmarks));
+#else
command_updater_.UpdateCommandEnabled(IDC_SHOW_BOOKMARK_MANAGER, true);
+#endif
command_updater_.UpdateCommandEnabled(IDC_SHOW_DOWNLOADS, true);
command_updater_.UpdateCommandEnabled(IDC_HELP_PAGE, true);
command_updater_.UpdateCommandEnabled(IDC_IMPORT_SETTINGS, true);
@@ -3287,7 +3301,14 @@
#endif
// Page-related commands
+#if defined(OS_CHROMEOS)
+ command_updater_.UpdateCommandEnabled(
+ IDC_BOOKMARK_PAGE,
+ normal_window && !CommandLine::ForCurrentProcess()->
+ HasSwitch(switches::kDisableBookmarks));
+#else
command_updater_.UpdateCommandEnabled(IDC_BOOKMARK_PAGE, normal_window);
+#endif
// Clipboard commands
command_updater_.UpdateCommandEnabled(IDC_COPY_URL, non_devtools_window);
@@ -3333,8 +3354,15 @@
// Page-related commands
window_->SetStarredState(current_tab->is_starred());
+#if defined(OS_CHROMEOS)
+ command_updater_.UpdateCommandEnabled(
+ IDC_BOOKMARK_ALL_TABS,
+ CanBookmarkAllTabs() && !CommandLine::ForCurrentProcess()->
+ HasSwitch(switches::kDisableBookmarks));
+#else
command_updater_.UpdateCommandEnabled(IDC_BOOKMARK_ALL_TABS,
CanBookmarkAllTabs());
+#endif
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

Powered by Google App Engine
This is Rietveld 408576698