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

Unified Diff: chrome/browser/extensions/extension_service.cc

Issue 326213004: Invoke callback from WebstoreInstaller when installation is fully complete (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Self nits Created 6 years, 6 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 c124c7220426bfb711cdadf209dff771b5f2d326..300901795803c5c34306c5bbd69389f617c2729b 100644
--- a/chrome/browser/extensions/extension_service.cc
+++ b/chrome/browser/extensions/extension_service.cc
@@ -1978,7 +1978,7 @@ void ExtensionService::FinishInstallation(
content::Source<Profile>(profile_),
content::Details<const extensions::InstalledExtensionInfo>(&details));
- ExtensionRegistry::Get(profile_)->TriggerOnWillBeInstalled(
+ registry_->TriggerOnWillBeInstalled(
extension, is_update, from_ephemeral, old_name);
bool unacknowledged_external = IsUnacknowledgedExternalExtension(extension);
@@ -1992,6 +1992,9 @@ void ExtensionService::FinishInstallation(
AddExtension(extension);
+ // Notify observers that need to know when an installation is complete.
+ registry_->TriggerOnInstalled(extension);
+
// If this is a new external extension that was disabled, alert the user
// so he can reenable it. We do this last so that it has already been
// added to our list of extensions.
@@ -2078,6 +2081,8 @@ void ExtensionService::PromoteEphemeralApp(
registry_->TriggerOnLoaded(extension);
}
+ registry_->TriggerOnInstalled(extension);
+
if (!is_from_sync && extension_sync_service_)
extension_sync_service_->SyncExtensionChangeIfNeeded(*extension);
}

Powered by Google App Engine
This is Rietveld 408576698