diff options
author | joaodasilva@chromium.org <joaodasilva@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-03-07 12:30:19 +0000 |
---|---|---|
committer | joaodasilva@chromium.org <joaodasilva@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-03-07 12:30:19 +0000 |
commit | d1630ac3b8f7a6087a50758e2125a4a8b1f1f662 (patch) | |
tree | 8c52baadd4363430d13eba558e5e3b0ef8d3f6ec /chrome/installer/setup | |
parent | 672c8c1e10e9b8f8b3416ed812cdfeae16005505 (diff) | |
download | chromium_src-d1630ac3b8f7a6087a50758e2125a4a8b1f1f662.zip chromium_src-d1630ac3b8f7a6087a50758e2125a4a8b1f1f662.tar.gz chromium_src-d1630ac3b8f7a6087a50758e2125a4a8b1f1f662.tar.bz2 |
Added master_preferences to control shortcuts on windows.
do_not_create_taskbar_shortcut prevents pinning the start menu shortcut to the taskbar on windows 7 and later.
do_not_create_any_shortcuts is a catch-all that prevents the creation of all shortcuts, including the start menu shortcut.
BUG=178076,174465
Review URL: https://chromiumcodereview.appspot.com/12316097
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@186681 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/installer/setup')
-rw-r--r-- | chrome/installer/setup/install.cc | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/chrome/installer/setup/install.cc b/chrome/installer/setup/install.cc index f477080..f64ed8e 100644 --- a/chrome/installer/setup/install.cc +++ b/chrome/installer/setup/install.cc @@ -360,14 +360,23 @@ void CreateOrUpdateShortcuts( const MasterPreferences& prefs, InstallShortcutLevel install_level, InstallShortcutOperation install_operation) { + bool do_not_create_any_shortcuts = false; + prefs.GetBool(master_preferences::kDoNotCreateAnyShortcuts, + &do_not_create_any_shortcuts); + if (do_not_create_any_shortcuts) + return; + // 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 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::kAltShortcutText, &alternate_desktop_shortcut); @@ -435,9 +444,10 @@ void CreateOrUpdateShortcuts( // 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) { + if (!do_not_create_taskbar_shortcut && + (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); } ExecuteAndLogShortcutOperation(ShellUtil::SHORTCUT_LOCATION_START_MENU, |