Made it possible to tell whether an extension is being installed or updated.

The NOTIFICATION_EXTENSION_INSTALLED message details now include a Boolean flag
already_installed, which, if true, implies that the extension is being updated
rather than installed.

BUG=234041
[email protected]

Review URL: https://chromiumcodereview.appspot.com/14238037

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@198079 0039d316-1c4b-4281-b951-d872f2087c98
diff --git a/chrome/browser/extensions/extension_service.cc b/chrome/browser/extensions/extension_service.cc
index 93593467..89e50cd 100644
--- a/chrome/browser/extensions/extension_service.cc
+++ b/chrome/browser/extensions/extension_service.cc
@@ -2423,10 +2423,12 @@
 }
 
 void ExtensionService::FinishInstallation(const Extension* extension) {
+  bool is_update = GetInstalledExtension(extension->id()) != NULL;
+  extensions::InstalledExtensionInfo details(extension, is_update);
   content::NotificationService::current()->Notify(
       chrome::NOTIFICATION_EXTENSION_INSTALLED,
       content::Source<Profile>(profile_),
-      content::Details<const Extension>(extension));
+      content::Details<const extensions::InstalledExtensionInfo>(&details));
 
   bool unacknowledged_external = IsUnacknowledgedExternalExtension(extension);