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

Unified Diff: chrome/browser/ui/toolbar/wrench_menu_model.cc

Issue 6287014: Removes "New Incognito Window" from wrench menu in Guest Session. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/chrome/browser/ui/toolbar
Patch Set: Created 9 years, 11 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/toolbar/wrench_menu_model.cc
diff --git a/chrome/browser/ui/toolbar/wrench_menu_model.cc b/chrome/browser/ui/toolbar/wrench_menu_model.cc
index 1c45e4d5ee38ceab4ab348a739ac6ab92cfc8f8a..2028512925d8e5cf7101b77cc257a2d1c4a72562 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))
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698