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

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

Issue 1750083004: Add badge to web notifications. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix test. Created 4 years, 9 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 f0a64a761e60099f2f21d385a08f31a4fa34a971..08297505482f79f8e6c3df5c906151f34736c66e 100644
--- a/content/browser/notifications/notification_message_filter.cc
+++ b/content/browser/notifications/notification_message_filter.cc
@@ -53,6 +53,10 @@ bool ValidateNotificationResources(const NotificationResources& resources) {
kPlatformNotificationMaxIconSizePx) {
return false;
}
+ if (resources.badge.width() > kPlatformNotificationMaxBadgeSizePx ||
+ resources.badge.height() > kPlatformNotificationMaxBadgeSizePx) {
+ return false;
+ }
for (const auto& action_icon : resources.action_icons) {
if (action_icon.width() > kPlatformNotificationMaxActionIconSizePx ||
action_icon.height() > kPlatformNotificationMaxActionIconSizePx) {

Powered by Google App Engine
This is Rietveld 408576698