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

Unified Diff: content/child/notifications/notification_data_conversions.cc

Issue 1644573002: Notification actions may have an icon url. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address peter's comments. 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
Index: content/child/notifications/notification_data_conversions.cc
diff --git a/content/child/notifications/notification_data_conversions.cc b/content/child/notifications/notification_data_conversions.cc
index 783d5a2380a5e5baa045b8dff447d105abae6117..c37a1c53b5c95191f2aa1e2d9f5ff36bc50e41b2 100644
--- a/content/child/notifications/notification_data_conversions.cc
+++ b/content/child/notifications/notification_data_conversions.cc
@@ -50,6 +50,8 @@ PlatformNotificationData ToPlatformNotificationData(
platform_data.actions[i].action =
base::UTF16ToUTF8(base::StringPiece16(web_data.actions[i].action));
platform_data.actions[i].title = web_data.actions[i].title;
+ platform_data.actions[i].icon =
+ blink::WebStringToGURL(web_data.actions[i].icon.string());
Peter Beverloo 2016/01/27 17:14:23 PTAL at content/child/notifications/notification_d
jochen (gone - plz use gerrit) 2016/01/28 12:12:24 should there be a max length of the URL?
Michael van Ouwerkerk 2016/02/01 14:39:22 Are you asking because this might be too large for
Michael van Ouwerkerk 2016/02/01 14:39:23 Done.
}
return platform_data;
@@ -87,6 +89,7 @@ WebNotificationData ToWebNotificationData(
web_data.actions[i].action =
blink::WebString::fromUTF8(platform_data.actions[i].action);
web_data.actions[i].title = platform_data.actions[i].title;
+ web_data.actions[i].icon = blink::WebURL(platform_data.actions[i].icon);
}
return web_data;

Powered by Google App Engine
This is Rietveld 408576698