DescriptionRefactor ShellUtil shortcut code -- single multi-purpose methods as opposed to many slighlty different methods.
Merge Quick Launch + Desktop logic into same call and add start menu shortcut logic in the mix too.
Make properties based API (like the one introduced in base/win/shortcut.h) with default values to simplify call sites who just want to create a basic Chrome shortcut.
shell_util.h:
(CreateChromeDesktopShortcut, CreateChromeQuickLaunchShortcut, UpdateChromeShortcut) => CreateOrUpdateChromeShortcut
(GetDesktopPath, GetQuickLaunchPath) => GetShortcutPath
(GetChromeShortcutName) => ChromeShortcutProperties::set_shortcut_name() (i.e. default name is GetAppShortcutName() unless set otherwise... special profile shortcut appending logic moved to ProfileShortcutManager::GetShortcutNameForProfile).
(RemoveChromeDesktopShortcut, RemoveChromeDesktopShortcutsWithAppendedNames) => RemoveChromeShortcut
install.h:
(CreateOrUpdateStartMenuAndTaskbarShortcuts, CreateOrUpdateDesktopAndQuickLaunchShortcuts) => CreateOrUpdateShortcuts (and incorporate some of the logic previously handled directly in InstallOrUpdateProduct()).
Finally thoroughly tests shell_util and install shortcut methods!
BUG=148539
TEST=Install chrome at user and system level with and without create_all_shortcuts master pref and make sure it works as intended in all scenarios.
installer_util_unittests.exe --gtest_filter=ShellUtilShortcutTest*
setup_unittests.exe --gtest_filter=InstallShortcutTest*
unit_tests.exe --gtest_filter=ProfileShortcutManagerTest*
Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=160284
Patch Set 1 : #Patch Set 2 : fix some comments #
Total comments: 5
Patch Set 3 : add comments to enums #Patch Set 4 : Fix shell_util_unittests.cc #
Total comments: 4
Patch Set 5 : brand new shell_util shortcut API + TESTS :)! #
Total comments: 36
Patch Set 6 : adress comments about shell_util interface #
Total comments: 18
Patch Set 7 : robert is the king of pool #
Total comments: 6
Patch Set 8 : hazzzzers #Patch Set 9 : respect microsoft's definition of correct C++ #Messages
Total messages: 20 (0 generated)
|