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

Unified Diff: chrome/browser/notifications/notification_platform_bridge_linux.cc

Issue 2866333002: Linux native notifications: Add percentage to title for progress notifications (Closed)
Patch Set: Created 3 years, 7 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_linux.cc
diff --git a/chrome/browser/notifications/notification_platform_bridge_linux.cc b/chrome/browser/notifications/notification_platform_bridge_linux.cc
index ca42642d1f00e969c0fd447ba03fb1487680ab23..9601a847ed0c27ce0b24d2be8f7fc1989e14ed82 100644
--- a/chrome/browser/notifications/notification_platform_bridge_linux.cc
+++ b/chrome/browser/notifications/notification_platform_bridge_linux.cc
@@ -432,7 +432,10 @@ class NotificationPlatformBridgeLinuxImpl
// app_icon passed implicitly via desktop-entry.
writer.AppendString("");
- writer.AppendString(base::UTF16ToUTF8(notification->title()));
+ std::string summary = base::UTF16ToUTF8(notification->title());
+ if (notification->type() == message_center::NOTIFICATION_TYPE_PROGRESS)
+ summary = base::IntToString(notification->progress()) + "% - " + summary;
Peter Beverloo 2017/05/09 22:51:54 nit: prefer base::FormatPercent() You should prob
Tom (Use chromium acct) 2017/05/10 20:10:20 Done.
+ writer.AppendString(summary);
std::string body;
if (base::ContainsKey(capabilities_, "body")) {
« 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