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

Unified Diff: chrome/browser/notifications/notification_ui_manager_mac.mm

Issue 1614993002: Do not try to load empty images (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 11 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/notifications/notification_ui_manager_mac.mm
diff --git a/chrome/browser/notifications/notification_ui_manager_mac.mm b/chrome/browser/notifications/notification_ui_manager_mac.mm
index f5fdf4a104605deda95e693d3c4c28935a558ca8..b8c5eb3d293f14bdb108c264d53fdefa62b3bbf8 100644
--- a/chrome/browser/notifications/notification_ui_manager_mac.mm
+++ b/chrome/browser/notifications/notification_ui_manager_mac.mm
@@ -121,7 +121,8 @@ void NotificationUIManagerMac::Add(const Notification& notification,
// Some functionality is only available in 10.9+ or requires private APIs
// Icon
- if ([toast respondsToSelector:@selector(_identityImage)]) {
+ if ([toast respondsToSelector:@selector(_identityImage)] &&
+ !notification.icon().IsEmpty()) {
[toast setValue:notification.icon().ToNSImage() forKey:@"_identityImage"];
[toast setValue:@NO forKey:@"_identityImageHasBorder"];
}
« 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