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

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: Created 7 years, 10 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 53dbbed6ac899243b1b7ab037a55a76e2da31f71..897b99c3b7de95b7deb384bf2f3127fe3c364016 100644
--- a/chrome/installer/setup/install.cc
+++ b/chrome/installer/setup/install.cc
@@ -385,11 +385,14 @@ 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_start_menu_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::kDoNotCreateStartMenuShortcut,
+ &do_not_create_start_menu_shortcut);
prefs.GetBool(master_preferences::kAltShortcutText,
&alternate_desktop_shortcut);
@@ -452,19 +455,22 @@ 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);
+ if (!do_not_create_start_menu_shortcut ||
+ shortcut_operation == ShellUtil::SHELL_SHORTCUT_REPLACE_EXISTING) {
+ 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);
+ }
+ 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.cc » ('j') | chrome/installer/util/master_preferences.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698