Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2013)

Unified Diff: apps/shortcut_manager.cc

Issue 14993013: Windows: When an app is updated and its name changes, recreate shortcuts. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Respond to reviewer feedback. Created 7 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | chrome/browser/extensions/extension_service.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: apps/shortcut_manager.cc
diff --git a/apps/shortcut_manager.cc b/apps/shortcut_manager.cc
index df31a797a3013550d08559297ffc787e51feb241..2bdccb5fc2cf75ac1e26af412be29527ab63621b 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);
}
« no previous file with comments | « no previous file | chrome/browser/extensions/extension_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698