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

Unified Diff: chrome/browser/extensions/extension_service.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: On rename, delete and repin taskbar shortcuts. 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
Index: chrome/browser/extensions/extension_service.cc
diff --git a/chrome/browser/extensions/extension_service.cc b/chrome/browser/extensions/extension_service.cc
index 0a0e19b181e02a952f1339ba41f89e5040b704ee..2838c378c8e39ae174fea8b8db8b070526067cec 100644
--- a/chrome/browser/extensions/extension_service.cc
+++ b/chrome/browser/extensions/extension_service.cc
@@ -2432,8 +2432,15 @@ void ExtensionService::FinishDelayedInstallation(
}
void ExtensionService::FinishInstallation(const Extension* extension) {
- bool is_update = GetInstalledExtension(extension->id()) != NULL;
- extensions::InstalledExtensionInfo details(extension, is_update);
+ const extensions::Extension* existing_extension =
+ GetInstalledExtension(extension->id());
+ bool is_update = false;
+ std::string old_name;
+ if (existing_extension) {
+ is_update = true;
+ old_name = existing_extension->name();
+ }
+ extensions::InstalledExtensionInfo details(extension, is_update, old_name);
content::NotificationService::current()->Notify(
chrome::NOTIFICATION_EXTENSION_INSTALLED,
content::Source<Profile>(profile_),

Powered by Google App Engine
This is Rietveld 408576698