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

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

Issue 243643003: Improve extension uninstall flow (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 8 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 35c06b88651c0152f1729273b39e13cfb6952258..47a4f43d0743a45c0c33c9c465882693bd038b0e 100644
--- a/chrome/browser/ui/cocoa/extensions/extension_uninstall_dialog_cocoa.mm
+++ b/chrome/browser/ui/cocoa/extensions/extension_uninstall_dialog_cocoa.mm
@@ -49,13 +49,12 @@ void ExtensionUninstallDialogCocoa::Show() {
NSButton* continueButton = [alert addButtonWithTitle:l10n_util::GetNSString(
IDS_EXTENSION_PROMPT_UNINSTALL_BUTTON)];
- // Clear the key equivalent (currently 'Return') because cancel is the default
- // button.
- [continueButton setKeyEquivalent:@""];
-
NSButton* cancelButton = [alert addButtonWithTitle:l10n_util::GetNSString(
IDS_CANCEL)];
- [cancelButton setKeyEquivalent:@"\r"];
+ if (triggering_extension_)
+ // Default to cancel when uninstall is triggered by API.
Yoyo Zhou 2014/04/18 23:07:13 This should also say "Default to accept when trigg
+ [continueButton setKeyEquivalent:@""];
+ [cancelButton setKeyEquivalent:@"\r"];
Yoyo Zhou 2014/04/18 23:07:13 This indentation level looks like a mistake.
Isaac (away) 2014/04/18 23:42:44 I believe both of these lines are needed to switch
Yoyo Zhou 2014/04/18 23:48:05 How about some braces?
Isaac (away) 2014/04/18 23:54:51 Done. Was trying to copy style from line 63-66.
[alert setMessageText:base::SysUTF8ToNSString(GetHeadingText())];
[alert setAlertStyle:NSWarningAlertStyle];

Powered by Google App Engine
This is Rietveld 408576698