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

Unified Diff: extensions/browser/extension_registry_observer.h

Issue 279073003: Add a function triggering extension installed to ExtensionRegistryObserver (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: feedback2 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_observer.h
diff --git a/extensions/browser/extension_registry_observer.h b/extensions/browser/extension_registry_observer.h
index 5880add25e63307af4691dae2e4bc98bdbcd7b99..b030e5af9c437722330ad7d1b7b46702083dada2 100644
--- a/extensions/browser/extension_registry_observer.h
+++ b/extensions/browser/extension_registry_observer.h
@@ -33,6 +33,17 @@ class ExtensionRegistryObserver {
virtual void OnExtensionUnloaded(content::BrowserContext* browser_context,
const Extension* extension,
UnloadedExtensionInfo::Reason reason) {}
+
+ // Called an extension is about to finish install. The extension won't be in
not at google - send to devlin 2014/05/16 23:03:35 Thanks for adding the comment. How about a slight
limasdf 2014/05/17 06:16:19 Done. Thank you.
+ // ExtensionRegistry and about to appear in the ExtensionRegistry.
+ // (But could be in any of the sets(terminated, blacklisted, enabled ,.).
+ // Caller probably want to listen for |OnExtensionLoaded()| unless they really
+ // want to know when an extension is about to be installed.
+ virtual void OnExtensionWillBeInstalled(
+ content::BrowserContext* browser_context,
+ const Extension* extension,
+ bool is_update,
+ const std::string& old_name) {}
};
} // namespace extensions

Powered by Google App Engine
This is Rietveld 408576698