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]; |