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

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

Issue 21443002: Add NOTIFICATION_EXTENSION_REMOVED for Extensions removed from ExtensionService. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: take 2 Created 7 years, 5 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 42cb3fa69ea9ea451229871e5df976d830fb9cd7..4028ee8e57736ab92d643df35c4d0ccb6dd3849f 100644
--- a/chrome/browser/extensions/extension_service.cc
+++ b/chrome/browser/extensions/extension_service.cc
@@ -1895,6 +1895,11 @@ void ExtensionService::UnloadExtension(
extensions_.Remove(extension->id());
NotifyExtensionUnloaded(extension.get(), reason);
+
+ content::NotificationService::current()->Notify(
+ chrome::NOTIFICATION_EXTENSION_REMOVED,
+ content::Source<Profile>(profile_),
+ content::Details<const Extension>(extension.get()));
}
void ExtensionService::UnloadAllExtensions() {
@@ -2599,7 +2604,14 @@ void ExtensionService::TrackTerminatedExtension(const Extension* extension) {
void ExtensionService::UntrackTerminatedExtension(const std::string& id) {
std::string lowercase_id = StringToLowerASCII(id);
+ const Extension* extension = terminated_extensions_.GetByID(lowercase_id);
terminated_extensions_.Remove(lowercase_id);
+ if (extension) {
+ content::NotificationService::current()->Notify(
+ chrome::NOTIFICATION_EXTENSION_REMOVED,
+ content::Source<Profile>(profile_),
+ content::Details<const Extension>(extension));
+ }
}
const Extension* ExtensionService::GetTerminatedExtension(
« no previous file with comments | « chrome/browser/extensions/extension_disabled_ui.cc ('k') | chrome/browser/extensions/external_install_ui.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698