diff options
author | asvitkine@chromium.org <asvitkine@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-02-25 21:40:53 +0000 |
---|---|---|
committer | asvitkine@chromium.org <asvitkine@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-02-25 21:40:53 +0000 |
commit | 597f68d20819453d3b13c483ba98a4d1b337b8fb (patch) | |
tree | 9875cdd7e82e226bf43a390d6f357ef132a21038 /chrome/browser | |
parent | 132ee93c9c7097b604f445506a2d260b38daeef4 (diff) | |
download | chromium_src-597f68d20819453d3b13c483ba98a4d1b337b8fb.zip chromium_src-597f68d20819453d3b13c483ba98a4d1b337b8fb.tar.gz chromium_src-597f68d20819453d3b13c483ba98a4d1b337b8fb.tar.bz2 |
Notify the shell to ensure desktop is refreshed when deleting profile shortcuts.
BUG=177807
TEST=Desktop no longer sometimes shows a stale shortcut after deleting
a profile that has a shortcut.
Review URL: https://chromiumcodereview.appspot.com/12330110
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@184485 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser')
-rw-r--r-- | chrome/browser/profiles/profile_shortcut_manager_win.cc | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/chrome/browser/profiles/profile_shortcut_manager_win.cc b/chrome/browser/profiles/profile_shortcut_manager_win.cc index e3f49fd..7c41f8d 100644 --- a/chrome/browser/profiles/profile_shortcut_manager_win.cc +++ b/chrome/browser/profiles/profile_shortcut_manager_win.cc @@ -4,6 +4,8 @@ #include "chrome/browser/profiles/profile_shortcut_manager_win.h" +#include <shlobj.h> // For SHChangeNotify(). + #include <string> #include <vector> @@ -416,6 +418,9 @@ void DeleteDesktopShortcutsAndIconFile(const base::FilePath& profile_path, // Use file_util::Delete() instead of ShellUtil::RemoveShortcut(), as the // latter causes non-profile taskbar shortcuts to be unpinned. file_util::Delete(shortcuts[i], false); + // Notify the shell that the shortcut was deleted to ensure desktop refresh. + SHChangeNotify(SHCNE_DELETE, SHCNF_PATH, shortcuts[i].value().c_str(), + NULL); } const base::FilePath icon_path = |