summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoraltimofeev@chromium.org <altimofeev@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-01-27 10:33:09 +0000
committeraltimofeev@chromium.org <altimofeev@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-01-27 10:33:09 +0000
commit86c6c3f2a231ac31569b4ae7cccdadd4250896b0 (patch)
tree7374c6a7c37eae660c961f7fb0f9310d36d04364
parent593740c0206bdc953740933c9cddf7709a33a796 (diff)
downloadchromium_src-86c6c3f2a231ac31569b4ae7cccdadd4250896b0.zip
chromium_src-86c6c3f2a231ac31569b4ae7cccdadd4250896b0.tar.gz
chromium_src-86c6c3f2a231ac31569b4ae7cccdadd4250896b0.tar.bz2
Removes "New Incognito Window" from wrench menu in Guest Session.
BUG=chromium-os:11087 TEST=manual Review URL: http://codereview.chromium.org/6287014 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@72780 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--chrome/browser/ui/toolbar/wrench_menu_model.cc16
1 files changed, 6 insertions, 10 deletions
diff --git a/chrome/browser/ui/toolbar/wrench_menu_model.cc b/chrome/browser/ui/toolbar/wrench_menu_model.cc
index 1c45e4d..2028512 100644
--- a/chrome/browser/ui/toolbar/wrench_menu_model.cc
+++ b/chrome/browser/ui/toolbar/wrench_menu_model.cc
@@ -285,14 +285,6 @@ bool WrenchMenuModel::IsCommandIdChecked(int command_id) const {
}
bool WrenchMenuModel::IsCommandIdEnabled(int command_id) const {
-#if defined(OS_CHROMEOS)
- // Special case because IDC_NEW_WINDOW item should be disabled in BWSI mode,
- // but accelerator should work.
- if (command_id == IDC_NEW_WINDOW &&
- CommandLine::ForCurrentProcess()->HasSwitch(switches::kGuestSession))
- return false;
-#endif
-
return browser_->command_updater()->IsCommandEnabled(command_id);
}
@@ -372,8 +364,12 @@ WrenchMenuModel::WrenchMenuModel()
void WrenchMenuModel::Build() {
AddItemWithStringId(IDC_NEW_TAB, IDS_NEW_TAB);
AddItemWithStringId(IDC_NEW_WINDOW, IDS_NEW_WINDOW);
- AddItemWithStringId(IDC_NEW_INCOGNITO_WINDOW,
- IDS_NEW_INCOGNITO_WINDOW);
+#if defined(OS_CHROMEOS)
+ if (!CommandLine::ForCurrentProcess()->HasSwitch(switches::kGuestSession))
+ AddItemWithStringId(IDC_NEW_INCOGNITO_WINDOW, IDS_NEW_INCOGNITO_WINDOW);
+#else
+ AddItemWithStringId(IDC_NEW_INCOGNITO_WINDOW, IDS_NEW_INCOGNITO_WINDOW);
+#endif
AddSeparator();
#if defined(OS_MACOSX) || (defined(OS_LINUX) && !defined(TOOLKIT_VIEWS))