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

Unified Diff: extensions/browser/extension_registry.cc

Issue 279073003: Add a function triggering extension installed to ExtensionRegistryObserver (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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
Index: extensions/browser/extension_registry.cc
diff --git a/extensions/browser/extension_registry.cc b/extensions/browser/extension_registry.cc
index ac6c274db6c13cbe21986b4f98ddc69165bda2b4..111bee70173242f8a4798ce849753dea23eb991a 100644
--- a/extensions/browser/extension_registry.cc
+++ b/extensions/browser/extension_registry.cc
@@ -53,6 +53,17 @@ void ExtensionRegistry::TriggerOnUnloaded(
OnExtensionUnloaded(browser_context_, extension, reason));
}
+void ExtensionRegistry::TriggerOnWillBeInstalled(const Extension* extension,
+ bool is_update,
+ const std::string& old_name) {
+ DCHECK(is_update ==
+ GenerateInstalledExtensionsSet()->Contains(extension->id()));
not at google - send to devlin 2014/05/21 16:33:36 also DCHECK(is_update == !old_name.empty());
limasdf 2014/05/21 21:40:46 Done.
+ FOR_EACH_OBSERVER(ExtensionRegistryObserver,
+ observers_,
+ OnExtensionWillBeInstalled(
+ browser_context_, extension, is_update, old_name));
+}
+
const Extension* ExtensionRegistry::GetExtensionById(const std::string& id,
int include_mask) const {
std::string lowercase_id = StringToLowerASCII(id);

Powered by Google App Engine
This is Rietveld 408576698