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

Unified Diff: extensions/common/extension.h

Issue 398083002: Add "UninstallReason" parameter to ExtensionRegistryObserver::OnExtensionUninstalled. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 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: extensions/common/extension.h
diff --git a/extensions/common/extension.h b/extensions/common/extension.h
index 933c47ce09d8cba6259a7468206621793c6cc55d..fc1ff34c579ce9a02dafe5cc2dac14c7646c62bf 100644
--- a/extensions/common/extension.h
+++ b/extensions/common/extension.h
@@ -543,6 +543,32 @@ struct UnloadedExtensionInfo {
UnloadedExtensionInfo(const Extension* extension, Reason reason);
};
+struct UninstalledExtensionInfo {
+ enum Reason {
+ REASON_FOR_TESTING, // Used for testing code only
+ REASON_USER_INITIATED, // User performed some UI gesture
+ REASON_EXTENSION_DISABLED, // Extension disabled due to error
+ REASON_STORAGE_THRESHOLD_EXCEEDED,
+ REASON_INSTALL_CANCELED,
+ REASON_MANAGEMENT_API,
+ REASON_SYNC,
+ REASON_ORPHANED_THEME,
+ REASON_ORPHANED_EPHEMERAL_EXTENSION,
+ // The entries below imply bypassing checking user has permission to
+ // uninstall the corresponding extension id.
+ REASON_ORPHANED_EXTERNAL_EXTENSION,
+ REASON_ORPHANED_SHARED_MODULE,
+ REASON_INTERNAL_MANAGEMENT // Internal extensions (see usages)
+ };
+
+ Reason reason;
+
+ // The extension being uninstalled - this should always be non-NULL.
+ const Extension* extension;
+
+ UninstalledExtensionInfo(const Extension* extension, Reason reason);
+};
+
// The details sent for EXTENSION_PERMISSIONS_UPDATED notifications.
struct UpdatedExtensionPermissionsInfo {
enum Reason {

Powered by Google App Engine
This is Rietveld 408576698