Chromium Code Reviews| 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 0c7943129f524cf44b86a6f05a28eb6d63be4ef9..886deca023e5671de6779134bfe563a650f0f497 100644 |
| --- a/chrome/browser/ui/browser_command_controller.cc |
| +++ b/chrome/browser/ui/browser_command_controller.cc |
| @@ -15,6 +15,7 @@ |
| #include "chrome/browser/lifetime/application_lifetime.h" |
| #include "chrome/browser/prefs/incognito_mode_prefs.h" |
| #include "chrome/browser/profiles/profile.h" |
| +#include "chrome/browser/profiles/profile_manager.h" |
| #include "chrome/browser/sessions/tab_restore_service.h" |
| #include "chrome/browser/sessions/tab_restore_service_factory.h" |
| #include "chrome/browser/shell_integration.h" |
| @@ -1034,7 +1035,8 @@ void BrowserCommandController::UpdateSharedCommandsForIncognitoAvailability( |
| incognito_availability != IncognitoModePrefs::FORCED); |
| command_updater->UpdateCommandEnabled( |
| IDC_NEW_INCOGNITO_WINDOW, |
| - incognito_availability != IncognitoModePrefs::DISABLED); |
| + incognito_availability != IncognitoModePrefs::DISABLED && |
| + profile->GetPath() != ProfileManager::GetGuestProfilePath()); |
|
msw
2014/09/25 21:20:06
How and why is this condition different from the "
Mike Lerman
2014/09/26 01:57:45
They're the same. I'll use IsGuestSession().
|
| const bool guest_session = profile->IsGuestSession(); |
| const bool forced_incognito = |