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

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

Issue 2836573002: Display the first item for list mac native notifications (Closed)
Patch Set: Created 3 years, 8 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_platform_bridge_mac.mm
diff --git a/chrome/browser/notifications/notification_platform_bridge_mac.mm b/chrome/browser/notifications/notification_platform_bridge_mac.mm
index 410eed0da881bbe0e4b2925b44f37e04aa52907c..b3357a6ceb216506db1525ac67c10aba3b35f6dd 100644
--- a/chrome/browser/notifications/notification_platform_bridge_mac.mm
+++ b/chrome/browser/notifications/notification_platform_bridge_mac.mm
@@ -183,7 +183,13 @@ void NotificationPlatformBridgeMac::Display(
[builder
setTitle:base::SysUTF16ToNSString(CreateNotificationTitle(notification))];
- [builder setContextMessage:base::SysUTF16ToNSString(notification.message())];
+ base::string16 context_message =
+ notification.items().empty()
+ ? notification.message()
+ : (notification.items().at(0).title + base::UTF8ToUTF16(" - ") +
+ notification.items().at(0).message);
+
+ [builder setContextMessage:base::SysUTF16ToNSString(context_message)];
bool requires_attribution =
notification.context_message().empty() &&
« 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