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

Unified Diff: chrome/browser/ui/cocoa/extensions/extension_uninstall_dialog_cocoa.mm

Issue 7920023: Fix crashes related to the extension uninstall dialog. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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/cocoa/extensions/extension_uninstall_dialog_cocoa.mm
diff --git a/chrome/browser/ui/cocoa/extensions/extension_uninstall_dialog_cocoa.mm b/chrome/browser/ui/cocoa/extensions/extension_uninstall_dialog_cocoa.mm
index 825fc9dccb0a1d1e1bbc5fe106a672bd22ee54c8..daac47a9fe69a73b76975df5c62f84d52babf5dc 100644
--- a/chrome/browser/ui/cocoa/extensions/extension_uninstall_dialog_cocoa.mm
+++ b/chrome/browser/ui/cocoa/extensions/extension_uninstall_dialog_cocoa.mm
@@ -18,11 +18,7 @@
#include "ui/base/resource/resource_bundle.h"
// static
-void ExtensionUninstallDialog::Show(
- Profile* profile,
- ExtensionUninstallDialog::Delegate* delegate,
- const Extension* extension,
- SkBitmap* icon) {
+void ExtensionUninstallUI::ShowDialog() {
NSAlert* alert = [[[NSAlert alloc] init] autorelease];
NSButton* continueButton = [alert addButtonWithTitle:l10n_util::GetNSString(
@@ -37,12 +33,16 @@ void ExtensionUninstallDialog::Show(
[alert setMessageText:l10n_util::GetNSStringF(
IDS_EXTENSION_UNINSTALL_PROMPT_HEADING,
- UTF8ToUTF16(extension->name()))];
+ UTF8ToUTF16(extension_->name()))];
[alert setAlertStyle:NSWarningAlertStyle];
- [alert setIcon:gfx::SkBitmapToNSImage(*icon)];
+ [alert setIcon:gfx::SkBitmapToNSImage(icon_)];
if ([alert runModal] == NSAlertFirstButtonReturn)
- delegate->ExtensionDialogAccepted();
+ delegate_->ExtensionUninstallAccepted();
else
- delegate->ExtensionDialogCanceled();
+ delegate_->ExtensionUninstallCanceled();
+
+ // We don't need to create an ExtensionUninstallDialog on Mac because the
+ // dialog prevents the page from changing so the widget is only closed by
Mihai Parparita -not on Chrome 2011/09/20 23:54:47 Can you make this comment a bit more explicit (add
jstritar 2011/09/22 16:47:13 Done.
+ // user action.
}

Powered by Google App Engine
This is Rietveld 408576698