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

Unified Diff: trunk/src/chrome/browser/extensions/extension_service.h

Issue 369863002: Revert 281130 "Replace "external_install" boolean parameter with..." (Closed) Base URL: svn://svn.chromium.org/chrome/
Patch Set: Created 6 years, 6 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: trunk/src/chrome/browser/extensions/extension_service.h
===================================================================
--- trunk/src/chrome/browser/extensions/extension_service.h (revision 281226)
+++ trunk/src/chrome/browser/extensions/extension_service.h (working copy)
@@ -155,26 +155,10 @@
public content::NotificationObserver,
public extensions::Blacklist::Observer {
public:
- enum UninstallReason {
- UNINSTALL_REASON_FOR_TESTING, // Used for testing code only
- UNINSTALL_REASON_USER_INITIATED, // User performed some UI gesture
- UNINSTALL_REASON_EXTENSION_DISABLED, // Extension disabled due to error
- UNINSTALL_REASON_INTERNAL_MANAGEMENT, // Internal extensions (see usages)
- UNINSTALL_REASON_STORAGE_THRESHOLD_EXCEEDED,
- UNINSTALL_REASON_EXTERNAL_INSTALL_CANCELED,
- UNINSTALL_REASON_MANAGEMENT_API,
- UNINSTALL_REASON_SYNC,
- UNINSTALL_REASON_ORPHANED_SHARED_MODULE,
- UNINSTALL_REASON_ORPHANED_THEME,
- UNINSTALL_REASON_ORPHANED_EXTERNAL_EXTENSION,
- UNINSTALL_REASON_ORPHANED_EPHEMERAL_EXTENSION
- };
-
// 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,
- UninstallReason reason);
+ const std::string& extension_id);
// Constructor stores pointers to |profile| and |extension_prefs| but
// ownership remains at caller.
@@ -256,10 +240,14 @@
void ReloadExtension(const std::string& extension_id);
// Uninstalls the specified extension. Callers should only call this method
- // with extensions that exist. |reason| lets the caller specify why the
- // extension is uninstalled.
+ // 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.
+ //
+ // TODO(aa): Remove |external_uninstall| -- this information should be passed
+ // to ExtensionPrefs some other way.
virtual bool UninstallExtension(const std::string& extension_id,
- UninstallReason reason,
+ bool external_uninstall,
base::string16* error);
// Enables the extension. If the extension is already enabled, does

Powered by Google App Engine
This is Rietveld 408576698