| Index: chrome/browser/ui/cocoa/javascript_app_modal_dialog_cocoa.mm
|
| diff --git a/chrome/browser/ui/cocoa/javascript_app_modal_dialog_cocoa.mm b/chrome/browser/ui/cocoa/javascript_app_modal_dialog_cocoa.mm
|
| index 51f96a0da3fc25cf35ab3df7b303203e179243ed..a9c7a833c60f8dada5ee5327634d7a8fe5c0481c 100644
|
| --- a/chrome/browser/ui/cocoa/javascript_app_modal_dialog_cocoa.mm
|
| +++ b/chrome/browser/ui/cocoa/javascript_app_modal_dialog_cocoa.mm
|
| @@ -83,10 +83,14 @@ const int kMessageTextMaxSlots = 2000;
|
| - (NSAlert*)alert {
|
| if (!alert_) {
|
| alert_.reset([[NSAlert alloc] init]);
|
| - // Set a blank icon.
|
| - NSImage* image =
|
| - [[[NSImage alloc] initWithSize:NSMakeSize(1, 1)] autorelease];
|
| - [alert_ setIcon:image];
|
| + if (!nativeDialog_->dialog()->is_before_unload_dialog()) {
|
| + // Set a blank icon for dialogs with text provided by the page.
|
| + // "onbeforeunload" dialogs don't have text provided by the page, so it's
|
| + // OK to use the app icon.
|
| + NSImage* image =
|
| + [[[NSImage alloc] initWithSize:NSMakeSize(1, 1)] autorelease];
|
| + [alert_ setIcon:image];
|
| + }
|
| }
|
| return alert_;
|
| }
|
|
|