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..11d59554568a7db4f90fe4e169af50a060f5874a 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,13 @@ 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"]; |
+ // Default to accept when triggered via chrome://extensions page. |
+ if (triggering_extension_) { |
+ [continueButton setKeyEquivalent:@""]; |
+ [cancelButton setKeyEquivalent:@"\r"]; |
+ } |
[alert setMessageText:base::SysUTF8ToNSString(GetHeadingText())]; |
[alert setAlertStyle:NSWarningAlertStyle]; |