diff options
author | gab@chromium.org <gab@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-07-06 18:46:09 +0000 |
---|---|---|
committer | gab@chromium.org <gab@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-07-06 18:46:09 +0000 |
commit | fe8aa5865854394201f2913dc9141bf2d25f780e (patch) | |
tree | a232c23259b0bb6ac86ac875f1dba09a5fcebf43 /base/file_util.h | |
parent | 0481124f832fc841b19b0b82bc42e7617f3da8b6 (diff) | |
download | chromium_src-fe8aa5865854394201f2913dc9141bf2d25f780e.zip chromium_src-fe8aa5865854394201f2913dc9141bf2d25f780e.tar.gz chromium_src-fe8aa5865854394201f2913dc9141bf2d25f780e.tar.bz2 |
Refactor CreateOrUpdateChromeShortcuts() for a better public API.
This is necessary as the follow-up patches will need a clean way to call CreateOrUpdateChromeShortcuts() while knowing the outcome which was kind of vague before (and would have required passing in a fake InstallStatus to simulate the desired behaviour...).
BUG=132825, 127544, 131415
TEST=Install Chrome at user and system-level with and without create_all_shortcuts and verify that shortcut creation is as expected.
Over-install this custom installer over chrome-dev after having deleted its shortcuts and verify they are not recreated.
Review URL: https://chromiumcodereview.appspot.com/10692034
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@145609 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base/file_util.h')
-rw-r--r-- | base/file_util.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/base/file_util.h b/base/file_util.h index 53eefcc..6cc13f0 100644 --- a/base/file_util.h +++ b/base/file_util.h @@ -203,8 +203,7 @@ enum ShortcutOptions { SHORTCUT_NO_OPTIONS = 0, // Set DualMode property for Windows 8 Metro-enabled shortcuts. SHORTCUT_DUAL_MODE = 1 << 0, - // Create a new shortcut (overwriting if necessary). If not specified, only - // non-null properties on an existing shortcut will be modified. + // Create a new shortcut (overwriting if necessary). SHORTCUT_CREATE_ALWAYS = 1 << 1, }; @@ -224,6 +223,9 @@ BASE_EXPORT bool ResolveShortcut(FilePath* path); // The |icon| can specify a dll or exe in which case the icon index is the // resource id. |app_id| is the app model id for the shortcut on Win7. // |options|: bitfield for which the options come from ShortcutOptions. +// If SHORTCUT_CREATE_ALWAYS is not set in |options|, only specified (non-null) +// properties on an existing shortcut will be modified. If the shortcut does not +// exist, this method is a no-op and returns false. BASE_EXPORT bool CreateOrUpdateShortcutLink(const wchar_t *source, const wchar_t *destination, const wchar_t *working_dir, |