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

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

Issue 398083002: Add "UninstallReason" parameter to ExtensionRegistryObserver::OnExtensionUninstalled. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix header file. 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: chrome/browser/extensions/extension_service.h
diff --git a/chrome/browser/extensions/extension_service.h b/chrome/browser/extensions/extension_service.h
index 95bd11b59a60c1acf8058eb8a240f92079754066..64a5980d95dbc971eb9dc0247a2de62d45723ab9 100644
--- a/chrome/browser/extensions/extension_service.h
+++ b/chrome/browser/extensions/extension_service.h
@@ -25,6 +25,7 @@
#include "extensions/browser/install_flag.h"
#include "extensions/browser/management_policy.h"
#include "extensions/browser/process_manager.h"
+#include "extensions/browser/uninstall_reason.h"
#include "extensions/common/extension.h"
#include "extensions/common/extension_set.h"
#include "extensions/common/manifest.h"
@@ -155,28 +156,11 @@ class ExtensionService
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_STORAGE_THRESHOLD_EXCEEDED,
- UNINSTALL_REASON_INSTALL_CANCELED,
- UNINSTALL_REASON_MANAGEMENT_API,
- UNINSTALL_REASON_SYNC,
- UNINSTALL_REASON_ORPHANED_THEME,
- UNINSTALL_REASON_ORPHANED_EPHEMERAL_EXTENSION,
- // The entries below imply bypassing checking user has permission to
- // uninstall the corresponding extension id.
- UNINSTALL_REASON_ORPHANED_EXTERNAL_EXTENSION,
- UNINSTALL_REASON_ORPHANED_SHARED_MODULE,
- UNINSTALL_REASON_INTERNAL_MANAGEMENT // Internal extensions (see usages)
- };
-
// 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);
+ extensions::UninstallReason reason);
// Constructor stores pointers to |profile| and |extension_prefs| but
// ownership remains at caller.
@@ -265,7 +249,7 @@ class ExtensionService
// with extensions that exist. |reason| lets the caller specify why the
// extension is uninstalled.
virtual bool UninstallExtension(const std::string& extension_id,
- UninstallReason reason,
+ extensions::UninstallReason reason,
base::string16* error);
// Enables the extension. If the extension is already enabled, does

Powered by Google App Engine
This is Rietveld 408576698