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

Unified Diff: extensions/browser/extension_registry.cc

Issue 289073008: Add TriggerOnUninstalled to ExtensionRegistry (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: address review comment Created 6 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
« no previous file with comments | « extensions/browser/extension_registry.h ('k') | extensions/browser/extension_registry_observer.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: extensions/browser/extension_registry.cc
diff --git a/extensions/browser/extension_registry.cc b/extensions/browser/extension_registry.cc
index 76783f0d336d7f8710db7503611799512ab83e1a..2b4d005d4db85e0fe7fa4e6dd2c7b6175c6e7d6b 100644
--- a/extensions/browser/extension_registry.cc
+++ b/extensions/browser/extension_registry.cc
@@ -65,6 +65,13 @@ void ExtensionRegistry::TriggerOnWillBeInstalled(const Extension* extension,
browser_context_, extension, is_update, old_name));
}
+void ExtensionRegistry::TriggerOnUninstalled(const Extension* extension) {
+ DCHECK(!GenerateInstalledExtensionsSet()->Contains(extension->id()));
+ FOR_EACH_OBSERVER(ExtensionRegistryObserver,
+ observers_,
+ OnExtensionUninstalled(browser_context_, extension));
+}
+
const Extension* ExtensionRegistry::GetExtensionById(const std::string& id,
int include_mask) const {
std::string lowercase_id = StringToLowerASCII(id);
« no previous file with comments | « extensions/browser/extension_registry.h ('k') | extensions/browser/extension_registry_observer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698