summaryrefslogtreecommitdiffstats
path: root/base
diff options
context:
space:
mode:
authorrobertshield@chromium.org <robertshield@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-04-15 16:07:17 +0000
committerrobertshield@chromium.org <robertshield@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-04-15 16:07:17 +0000
commite1ce5aef186ab99aa97c7d6cc78dd587fabf13ab (patch)
tree3459b78b71106fb97f253a39623bfcdf5923dfa9 /base
parent18cc5a578b6bc5eca8854cf6da68ff9878975d8b (diff)
downloadchromium_src-e1ce5aef186ab99aa97c7d6cc78dd587fabf13ab.zip
chromium_src-e1ce5aef186ab99aa97c7d6cc78dd587fabf13ab.tar.gz
chromium_src-e1ce5aef186ab99aa97c7d6cc78dd587fabf13ab.tar.bz2
Send ShChange notifications to cause icon refreshes when updating shortcuts.
BUG=78398 TEST=Install version 11.0.696.0 or earlier, then install 11.0.696.36 or later. Observe the desktop icons being updated. Review URL: http://codereview.chromium.org/6870008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@81751 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base')
-rw-r--r--base/file_util_win.cc10
1 files changed, 10 insertions, 0 deletions
diff --git a/base/file_util_win.cc b/base/file_util_win.cc
index fbca30b..3689614 100644
--- a/base/file_util_win.cc
+++ b/base/file_util_win.cc
@@ -503,6 +503,16 @@ bool UpdateShortcutLink(const wchar_t *source, const wchar_t *destination,
}
HRESULT result = i_persist_file->Save(destination, TRUE);
+
+ i_persist_file.Release();
+ i_shell_link.Release();
+
+ // If we successfully updated the icon, notify the shell that we have done so.
+ if (SUCCEEDED(result)) {
+ SHChangeNotify(SHCNE_ASSOCCHANGED, SHCNF_IDLIST | SHCNF_FLUSHNOWAIT,
+ NULL, NULL);
+ }
+
return SUCCEEDED(result);
}