Skip to content

Commit

Permalink
Send ShChange notifications to cause icon refreshes when updating sho…
Browse files Browse the repository at this point in the history
…rtcuts.

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
  • Loading branch information
robertshield@chromium.org committed Apr 15, 2011
1 parent 18cc5a5 commit e1ce5ae
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions base/file_util_win.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

Expand Down

0 comments on commit e1ce5ae

Please sign in to comment.