diff options
author | mgiuca@chromium.org <mgiuca@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-05-29 00:36:56 +0000 |
---|---|---|
committer | mgiuca@chromium.org <mgiuca@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-05-29 00:36:56 +0000 |
commit | e7554c3fd715e27d5dbf2b915c41ef9313c54783 (patch) | |
tree | d54447077b3edbfc64a7d491d22701fdc36d4c31 /apps | |
parent | 695fb3343cbc8d336390b4197f10cc1d40e191f7 (diff) | |
download | chromium_src-e7554c3fd715e27d5dbf2b915c41ef9313c54783.zip chromium_src-e7554c3fd715e27d5dbf2b915c41ef9313c54783.tar.gz chromium_src-e7554c3fd715e27d5dbf2b915c41ef9313c54783.tar.bz2 |
Windows: When an app is updated and its name changes, recreate shortcuts.
This searches for shortcuts in the usual locations containing the app's old
name, deletes them, and creates new shortcuts in the places where there were
pre-existing shortcuts.
BUG=153981
Review URL: https://chromiumcodereview.appspot.com/14993013
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@202712 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'apps')
-rw-r--r-- | apps/shortcut_manager.cc | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/apps/shortcut_manager.cc b/apps/shortcut_manager.cc index df31a79..2bdccb5 100644 --- a/apps/shortcut_manager.cc +++ b/apps/shortcut_manager.cc @@ -6,6 +6,8 @@ #include "base/bind.h" #include "base/compiler_specific.h" +#include "base/string16.h" +#include "base/utf_string_conversions.h" #include "chrome/browser/shell_integration.h" #include "chrome/browser/ui/web_applications/web_app_ui.h" #include "chrome/browser/web_applications/web_app.h" @@ -61,7 +63,9 @@ void ShortcutManager::Observe(int type, base::Callback<void(const ShellIntegration::ShortcutInfo&)> create_or_update; if (installed_info->is_update) { - create_or_update = base::Bind(&web_app::UpdateAllShortcuts); + string16 old_title = UTF8ToUTF16(installed_info->old_name); + create_or_update = base::Bind(&web_app::UpdateAllShortcuts, + old_title); } else { create_or_update = base::Bind(&CreateShortcutsInApplicationsMenu); } |