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

Unified Diff: content/browser/notifications/notification_message_filter.cc

Issue 2261283002: Add Notification images (Blink + desktop implementation) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 4 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/browser/notifications/notification_message_filter.cc
diff --git a/content/browser/notifications/notification_message_filter.cc b/content/browser/notifications/notification_message_filter.cc
index e37d21b6fe1b61a6bc02acdb37b422dd95ca1181..1565c14e168ef0a39b3fe503438ff67ec2422058 100644
--- a/content/browser/notifications/notification_message_filter.cc
+++ b/content/browser/notifications/notification_message_filter.cc
@@ -48,6 +48,10 @@ PlatformNotificationData SanitizeNotificationData(
// Returns true when |resources| looks ok, false otherwise.
bool ValidateNotificationResources(const NotificationResources& resources) {
Peter Beverloo 2016/08/22 20:11:07 We should probably check that the command line fla
johnme 2016/08/23 14:59:49 Done.
+ if (resources.image.width() > blink::kWebNotificationMaxImageWidthPx ||
+ resources.image.height() > blink::kWebNotificationMaxImageHeightPx) {
+ return false;
+ }
if (resources.notification_icon.width() >
blink::kWebNotificationMaxIconSizePx ||
resources.notification_icon.height() >

Powered by Google App Engine
This is Rietveld 408576698