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

Unified Diff: chrome/browser/ui/webui/ntp/app_launcher_handler.cc

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: chrome/browser/ui/webui/ntp/app_launcher_handler.cc
diff --git a/chrome/browser/ui/webui/ntp/app_launcher_handler.cc b/chrome/browser/ui/webui/ntp/app_launcher_handler.cc
index 8ba4e5c5c0b9239516b54ef33903c427e518658c..8d5293d4eaa63ec6c424e9a9fc80dc405e8f879d 100644
--- a/chrome/browser/ui/webui/ntp/app_launcher_handler.cc
+++ b/chrome/browser/ui/webui/ntp/app_launcher_handler.cc
@@ -69,6 +69,7 @@ using extensions::Extension;
using extensions::ExtensionPrefs;
using extensions::ExtensionRegistry;
using extensions::ExtensionSet;
+using extensions::UninstalledExtensionInfo;
using extensions::UnloadedExtensionInfo;
namespace {
@@ -286,7 +287,8 @@ void AppLauncherHandler::Observe(int type,
const Extension* extension = NULL;
bool uninstalled = false;
if (type == chrome::NOTIFICATION_EXTENSION_UNINSTALLED_DEPRECATED) {
- extension = content::Details<const Extension>(details).ptr();
+ extension = content::Details<extensions::UninstalledExtensionInfo>(
+ details)->extension;
uninstalled = true;
} else { // NOTIFICATION_EXTENSION_UNLOADED_DEPRECATED
if (content::Details<UnloadedExtensionInfo>(details)->reason ==
@@ -794,7 +796,7 @@ void AppLauncherHandler::ExtensionUninstallAccepted() {
extension_service_->UninstallExtension(
extension_id_prompting_,
- ExtensionService::UNINSTALL_REASON_USER_INITIATED,
+ UninstalledExtensionInfo::REASON_USER_INITIATED,
NULL);
CleanupAfterUninstall();
}

Powered by Google App Engine
This is Rietveld 408576698