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

Unified Diff: chrome/installer/setup/install.cc

Issue 12316097: Added master_preferences to control shortcuts on windows. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: split into 2 prefs Created 7 years, 9 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/installer/setup/install.cc
diff --git a/chrome/installer/setup/install.cc b/chrome/installer/setup/install.cc
index f4770806bbf9b8f3740150bcf81543a066120ce7..51b81d823613bdee1dc689446c42a34cbb9af0e5 100644
--- a/chrome/installer/setup/install.cc
+++ b/chrome/installer/setup/install.cc
@@ -363,11 +363,17 @@ void CreateOrUpdateShortcuts(
// Extract shortcut preferences from |prefs|.
bool do_not_create_desktop_shortcut = false;
bool do_not_create_quick_launch_shortcut = false;
+ bool do_not_create_taskbar_shortcut = false;
+ bool do_not_create_any_shortcuts = false;
bool alternate_desktop_shortcut = false;
prefs.GetBool(master_preferences::kDoNotCreateDesktopShortcut,
&do_not_create_desktop_shortcut);
prefs.GetBool(master_preferences::kDoNotCreateQuickLaunchShortcut,
&do_not_create_quick_launch_shortcut);
+ prefs.GetBool(master_preferences::kDoNotCreateTaskbarShortcut,
+ &do_not_create_taskbar_shortcut);
+ prefs.GetBool(master_preferences::kDoNotCreateAnyShortcuts,
+ &do_not_create_any_shortcuts);
prefs.GetBool(master_preferences::kAltShortcutText,
&alternate_desktop_shortcut);
@@ -430,19 +436,24 @@ void CreateOrUpdateShortcuts(
quick_launch_properties, shortcut_operation);
}
- ShellUtil::ShortcutProperties start_menu_properties(base_properties);
- // IMPORTANT: Only the default (no arguments and default browserappid) browser
- // shortcut in the Start menu (Start screen on Win8+) should be made dual
- // mode.
- start_menu_properties.set_dual_mode(true);
- if (shortcut_operation == ShellUtil::SHELL_SHORTCUT_CREATE_ALWAYS ||
- shortcut_operation ==
- ShellUtil::SHELL_SHORTCUT_CREATE_IF_NO_SYSTEM_LEVEL) {
- start_menu_properties.set_pin_to_taskbar(true);
+ // Currently, |do_not_create_any_shortcuts| only affects the creation of the
gab 2013/03/06 20:20:32 I was seeing more "do_not_create_any_shortcuts" as
Joao da Silva 2013/03/06 21:21:33 Makes sense, done.
+ // start menu shortcut; all the other do_not_* flags are overridden by
+ // |do_not_create_any_shortcuts|.
+ if (!do_not_create_any_shortcuts) {
+ ShellUtil::ShortcutProperties start_menu_properties(base_properties);
+ // IMPORTANT: Only the default (no arguments and default browserappid)
+ // browser shortcut in the Start menu (Start screen on Win8+) should be made
+ // dual mode.
+ start_menu_properties.set_dual_mode(true);
+ if (shortcut_operation == ShellUtil::SHELL_SHORTCUT_CREATE_ALWAYS ||
+ shortcut_operation ==
+ ShellUtil::SHELL_SHORTCUT_CREATE_IF_NO_SYSTEM_LEVEL) {
+ start_menu_properties.set_pin_to_taskbar(!do_not_create_taskbar_shortcut);
gab 2013/03/06 20:20:32 Shouldn't set this bit if (!do_not_create_taskbar_
Joao da Silva 2013/03/06 21:21:33 Done (this was just setting it to false in that ca
gab 2013/03/06 23:18:16 Oh my bad, I had missed this change (had assumed t
+ }
+ ExecuteAndLogShortcutOperation(ShellUtil::SHORTCUT_LOCATION_START_MENU,
+ dist, start_menu_properties,
+ shortcut_operation);
}
- ExecuteAndLogShortcutOperation(ShellUtil::SHORTCUT_LOCATION_START_MENU,
- dist, start_menu_properties,
- shortcut_operation);
}
void RegisterChromeOnMachine(const InstallerState& installer_state,
« no previous file with comments | « no previous file | chrome/installer/util/master_preferences.h » ('j') | chrome/installer/util/master_preferences.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698