Chromium Code Reviews| Index: chrome/browser/extensions/extension_service.h |
| diff --git a/chrome/browser/extensions/extension_service.h b/chrome/browser/extensions/extension_service.h |
| index 03f18a1957bce230be6e745614a80eefb2d8d16b..1cf996957a51f6d861ce2c76565cc9ab121aeab9 100644 |
| --- a/chrome/browser/extensions/extension_service.h |
| +++ b/chrome/browser/extensions/extension_service.h |
| @@ -128,10 +128,21 @@ class ExtensionService |
| public content::NotificationObserver, |
| public extensions::Blacklist::Observer { |
| public: |
| + enum UninstallReason { |
| + kUninstallReasonDefault, |
|
Devlin
2014/05/14 23:14:20
For better or worse, Extensions code overwhelmingl
rpaquay
2014/06/30 23:16:18
Done.
|
| + kUninstallReasonOrphanedSharedModule, |
| + kUninstallReasonOrphanedTheme, |
| + kUninstallReasonOrphanedExternalExtension, |
| + kUninstallReasonOrphanedEphemeralExtension, |
| + kUninstallReasonUserInitiated, |
| + kUninstallReasonSynch, |
|
Devlin
2014/05/14 23:14:20
nit: "Sync" is more common spelling in the code.
rpaquay
2014/06/30 23:16:18
Done.
|
| + }; |
| + |
| // Attempts to uninstall an extension from a given ExtensionService. Returns |
| // true iff the target extension exists. |
| static bool UninstallExtensionHelper(ExtensionService* extensions_service, |
| - const std::string& extension_id); |
| + const std::string& extension_id, |
| + UninstallReason reason); |
| // Constructor stores pointers to |profile| and |extension_prefs| but |
| // ownership remains at caller. |
| @@ -196,18 +207,10 @@ class ExtensionService |
| void ReloadExtension(const std::string extension_id); |
| // Uninstalls the specified extension. Callers should only call this method |
| - // with extensions that exist. |external_uninstall| is a magical parameter |
| - // that is only used to send information to ExtensionPrefs, which external |
| - // callers should never set to true. |
| - // |
| - // We pass the |extension_id| by value to avoid having it deleted from under |
| - // us incase someone calls it with Extension::id() or another string that we |
| - // are going to delete in this function. |
| - // |
| - // TODO(aa): Remove |external_uninstall| -- this information should be passed |
| - // to ExtensionPrefs some other way. |
| + // with extensions that exist. |reason| lets the caller specify why the |
| + // extension is uninstalled. |
| virtual bool UninstallExtension(const std::string& extension_id, |
| - bool external_uninstall, |
| + UninstallReason reason, |
| base::string16* error); |
| virtual bool IsExtensionEnabled( |