Index: chrome/browser/ui/browser_command_controller.cc |
diff --git a/chrome/browser/ui/browser_command_controller.cc b/chrome/browser/ui/browser_command_controller.cc |
index be7339df18bbbe48ce7c5a76f629db6eb8d5909e..65977110be5676af21b6c3ced266e6a153c73a85 100644 |
--- a/chrome/browser/ui/browser_command_controller.cc |
+++ b/chrome/browser/ui/browser_command_controller.cc |
@@ -1046,16 +1046,6 @@ void BrowserCommandController::UpdateCommandsForFullscreenMode() { |
#endif |
UpdateShowSyncState(show_main_ui); |
- // Settings page/subpages are forced to open in normal mode. We disable these |
- // commands for guest sessions and when incognito is forced. |
- const bool options_enabled = show_main_ui && |
- IncognitoModePrefs::GetAvailability( |
- profile()->GetPrefs()) != IncognitoModePrefs::FORCED; |
- const bool guest_session = profile()->IsGuestSession(); |
- command_updater_.UpdateCommandEnabled(IDC_OPTIONS, options_enabled); |
- command_updater_.UpdateCommandEnabled(IDC_IMPORT_SETTINGS, |
- options_enabled && !guest_session); |
- |
command_updater_.UpdateCommandEnabled(IDC_EDIT_SEARCH_ENGINES, show_main_ui); |
command_updater_.UpdateCommandEnabled(IDC_VIEW_PASSWORDS, show_main_ui); |
command_updater_.UpdateCommandEnabled(IDC_ABOUT, show_main_ui); |
@@ -1077,6 +1067,7 @@ void BrowserCommandController::UpdateCommandsForFullscreenMode() { |
fullscreen_enabled); |
UpdateCommandsForBookmarkBar(); |
+ UpdateCommandsForIncognitoAvailability(); |
msw
2017/02/23 19:07:28
I was slightly worried that this updates the enabl
Hzj_jie
2017/02/23 22:00:09
I think a simple rule to avoid the conflict is to
msw
2017/02/23 22:19:43
I generally agree, but doubt the effectiveness of
|
} |
void BrowserCommandController::UpdatePrintingState() { |