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

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

Issue 7920023: Fix crashes related to the extension uninstall dialog. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: make Show() pure virtual Created 9 years, 3 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 86a34cab491a248d0831d42008487e656dc5da87..3a9d56335f8a9714cc55693c95598a506b86262e 100644
--- a/chrome/browser/ui/webui/ntp/app_launcher_handler.cc
+++ b/chrome/browser/ui/webui/ntp/app_launcher_handler.cc
@@ -642,9 +642,9 @@ void AppLauncherHandler::HandleUninstallApp(const ListValue* args) {
scoped_ptr<AutoReset<bool> > auto_reset;
if (NewTabUI::NTP4Enabled())
auto_reset.reset(new AutoReset<bool>(&ignore_changes_, true));
- ExtensionDialogAccepted();
+ ExtensionUninstallAccepted();
} else {
- GetExtensionUninstallDialog()->ConfirmUninstall(this, extension);
+ GetExtensionUninstallDialog()->ConfirmUninstall(extension);
}
}
@@ -913,7 +913,7 @@ void AppLauncherHandler::PromptToEnableApp(const std::string& extension_id) {
GetExtensionInstallUI()->ConfirmReEnable(this, extension);
}
-void AppLauncherHandler::ExtensionDialogAccepted() {
+void AppLauncherHandler::ExtensionUninstallAccepted() {
// Do the uninstall work here.
DCHECK(!extension_id_prompting_.empty());
@@ -930,7 +930,7 @@ void AppLauncherHandler::ExtensionDialogAccepted() {
extension_id_prompting_ = "";
}
-void AppLauncherHandler::ExtensionDialogCanceled() {
+void AppLauncherHandler::ExtensionUninstallCanceled() {
extension_id_prompting_ = "";
}
@@ -958,7 +958,7 @@ void AppLauncherHandler::InstallUIProceed() {
}
void AppLauncherHandler::InstallUIAbort(bool user_initiated) {
- // We record the histograms here because ExtensionDialogCanceled is also
+ // We record the histograms here because ExtensionUninstallCanceled is also
// called when the extension uninstall dialog is canceled.
const Extension* extension =
extension_service_->GetExtensionById(extension_id_prompting_, true);
@@ -968,13 +968,13 @@ void AppLauncherHandler::InstallUIAbort(bool user_initiated) {
ExtensionService::RecordPermissionMessagesHistogram(
extension, histogram_name.c_str());
- ExtensionDialogCanceled();
+ ExtensionUninstallCanceled();
}
ExtensionUninstallDialog* AppLauncherHandler::GetExtensionUninstallDialog() {
if (!extension_uninstall_dialog_.get()) {
extension_uninstall_dialog_.reset(
- new ExtensionUninstallDialog(Profile::FromWebUI(web_ui_)));
+ ExtensionUninstallDialog::Create(Profile::FromWebUI(web_ui_), this));
}
return extension_uninstall_dialog_.get();
}
« no previous file with comments | « chrome/browser/ui/webui/ntp/app_launcher_handler.h ('k') | chrome/browser/ui/webui/options/extension_settings_handler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698