summaryrefslogtreecommitdiffstats
path: root/base/file_util.h
diff options
context:
space:
mode:
authorxiyuan@chromium.org <xiyuan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-11-19 09:18:50 +0000
committerxiyuan@chromium.org <xiyuan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-11-19 09:18:50 +0000
commit86b5401aa4c221ea07185bb493bb9557d779be0e (patch)
tree7692a2c15897b02e99b3ece5a941abae6553c373 /base/file_util.h
parent4ea927b886af2654b5a193278c0bfb6c25b56fc7 (diff)
downloadchromium_src-86b5401aa4c221ea07185bb493bb9557d779be0e.zip
chromium_src-86b5401aa4c221ea07185bb493bb9557d779be0e.tar.gz
chromium_src-86b5401aa4c221ea07185bb493bb9557d779be0e.tar.bz2
Set prop app id for chromium/application shortcut.
This is a follow up change after andrew's patch for win7 shortcut to properly set app id for chromium/application shortcut. - Move PKEY_AppUserModel_ID and code to set it from app/win_util.cc to base/win_util.cc as SetAppIdForPropertyStore to share with file_util shortcut code; - Add an app_id args to file_util's CreateShortcutLink and UpdateShortcutLink; - Update code that calls the above two function in installer and UserDataManager so that the chromium shortcuts are created with proper app id (except the uninstall shortcut which is not tagged with any app id). - Move ComputeApplicationNameFromURL from Browser to web_app namespace and use it as app id for application shortcut. This makes pinned shortcut and browser window use the same app id and Win7 correctly groups them; - Rename ComputeApplicationNameFromURL to GenerateApplicationNameFromURL per Ben's comments; - Add a DCHECK in SetAppIdForPropertyStore to ensure app id is less than 128 chars and contains no space per msdn; - Change default app id from IDS_PRODUCT_NAME to chrome::kBrowserAppName BUG=28104 TEST=On Win7, pinned shortcut should no longer be separated from running instance of chrome for both chrome and web application. Review URL: http://codereview.chromium.org/399045 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@32508 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base/file_util.h')
-rw-r--r--base/file_util.h10
1 files changed, 5 insertions, 5 deletions
diff --git a/base/file_util.h b/base/file_util.h
index 60e9793..915065e 100644
--- a/base/file_util.h
+++ b/base/file_util.h
@@ -218,24 +218,24 @@ bool ResolveShortcut(FilePath* path);
// 'source' is the existing file, 'destination' is the new link file to be
// created; for best results pass the filename with the .lnk extension.
// The 'icon' can specify a dll or exe in which case the icon index is the
-// resource id.
+// resource id. 'app_id' is the app model id for the shortcut on Win7.
// Note that if the shortcut exists it will overwrite it.
bool CreateShortcutLink(const wchar_t *source, const wchar_t *destination,
const wchar_t *working_dir, const wchar_t *arguments,
const wchar_t *description, const wchar_t *icon,
- int icon_index);
+ int icon_index, const wchar_t* app_id);
// Update a Windows shortcut (.LNK file). This method assumes the shortcut
// link already exists (otherwise false is returned). Ensure you have
// initialized COM before calling into this function. Only 'destination'
// parameter is required, everything else can be NULL (but if everything else
// is NULL no changes are made to the shortcut). 'destination' is the link
-// file to be updated. For best results pass the filename with the .lnk
-// extension.
+// file to be updated. 'app_id' is the app model id for the shortcut on Win7.
+// For best results pass the filename with the .lnk extension.
bool UpdateShortcutLink(const wchar_t *source, const wchar_t *destination,
const wchar_t *working_dir, const wchar_t *arguments,
const wchar_t *description, const wchar_t *icon,
- int icon_index);
+ int icon_index, const wchar_t* app_id);
// Pins a shortcut to the Windows 7 taskbar. The shortcut file must already
// exist and be a shortcut that points to an executable.