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

Unified Diff: chrome/browser/ui/cocoa/javascript_app_modal_dialog_cocoa.mm

Issue 1668283002: Set empty icon to alert dialogs on mac (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 10 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 fa6d65f95eb8f30e4324317d593a1f0a81d7f58b..6ad973e3654b7a1341d01fb8ec480b14a4b9666c 100644
--- a/chrome/browser/ui/cocoa/javascript_app_modal_dialog_cocoa.mm
+++ b/chrome/browser/ui/cocoa/javascript_app_modal_dialog_cocoa.mm
@@ -81,8 +81,10 @@ const int kMessageTextMaxSlots = 2000;
}
- (NSAlert*)alert {
- if (!alert_)
+ if (!alert_) {
alert_.reset([[NSAlert alloc] init]);
+ [alert_ setIcon:[NSImage new]];
meacer 2016/02/04 22:17:58 Not sure about the ownership here, does alert own
droger 2016/02/05 10:33:01 Drive-by. I expect this to be a memory leak. Does
Avi (use Gerrit) 2016/02/05 17:06:09 It'll make its own reference, so you're leaking he
Avi (use Gerrit) 2016/02/05 17:11:23 Gah, yes. I replied but forgot to mail my comments
meacer 2016/02/05 19:37:16 Done, thanks for the snippet.
+ }
return alert_;
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698