summaryrefslogtreecommitdiffstats
path: root/chrome/installer/util
diff options
context:
space:
mode:
authorgrt <grt@chromium.org>2015-06-22 21:52:21 -0700
committerCommit bot <commit-bot@chromium.org>2015-06-23 04:53:01 +0000
commitfdeaa0e1d9ca6166b27e5f8ac19bba3a5ee9fcb2 (patch)
tree166cb5dcd8b120f151ab56d9cad72ce1f1756920 /chrome/installer/util
parent69c24ff2eadf87a6ebd233ad79643b41d9e7e1e3 (diff)
downloadchromium_src-fdeaa0e1d9ca6166b27e5f8ac19bba3a5ee9fcb2.zip
chromium_src-fdeaa0e1d9ca6166b27e5f8ac19bba3a5ee9fcb2.tar.gz
chromium_src-fdeaa0e1d9ca6166b27e5f8ac19bba3a5ee9fcb2.tar.bz2
Pin shortcuts via shell verbs rather than ShellExecuteEx.
BUG=498383 TEST=Chrome's icon is pinned to the taskbar upon install on Win7, 8, 8.1, and 10. TBR=sky@chromium.org Review URL: https://codereview.chromium.org/1193363003 Cr-Commit-Position: refs/heads/master@{#335630}
Diffstat (limited to 'chrome/installer/util')
-rw-r--r--chrome/installer/util/shell_util.cc8
1 files changed, 3 insertions, 5 deletions
diff --git a/chrome/installer/util/shell_util.cc b/chrome/installer/util/shell_util.cc
index f96036f..87a0d58 100644
--- a/chrome/installer/util/shell_util.cc
+++ b/chrome/installer/util/shell_util.cc
@@ -1398,7 +1398,7 @@ typedef base::Callback<bool(const base::FilePath& /*shortcut_path*/)>
bool ShortcutOpUnpin(const base::FilePath& shortcut_path) {
VLOG(1) << "Trying to unpin " << shortcut_path.value();
- if (!base::win::TaskbarUnpinShortcutLink(shortcut_path.value().c_str())) {
+ if (!base::win::TaskbarUnpinShortcutLink(shortcut_path)) {
VLOG(1) << shortcut_path.value() << " wasn't pinned (or the unpin failed).";
// No error, since shortcut might not be pinned.
}
@@ -1768,10 +1768,8 @@ bool ShellUtil::CreateOrUpdateShortcut(
if (ret && shortcut_operation == base::win::SHORTCUT_CREATE_ALWAYS &&
properties.pin_to_taskbar &&
base::win::GetVersion() >= base::win::VERSION_WIN7) {
- ret = base::win::TaskbarPinShortcutLink(chosen_path->value().c_str());
- if (!ret) {
- LOG(ERROR) << "Failed to pin " << chosen_path->value();
- }
+ ret = base::win::TaskbarPinShortcutLink(*chosen_path);
+ LOG_IF(ERROR, !ret) << "Failed to pin " << chosen_path->value();
}
return ret;