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

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: Rename DeleteAndRememberShortcuts to GetShortcutLocationsAndDeleteShortcuts; Minor refactor. 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 f1cb6c0fca5eb92a9142da64f0add913356c6922..74eae9925af181630bd9870870a7f134486769d3 100644
--- a/chrome/browser/extensions/extension_service.cc
+++ b/chrome/browser/extensions/extension_service.cc
@@ -2425,8 +2425,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