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

Unified Diff: ui/message_center/notification_list.cc

Issue 439073002: Web Notifications should always reappear as popups when updated. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 6 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: ui/message_center/notification_list.cc
diff --git a/ui/message_center/notification_list.cc b/ui/message_center/notification_list.cc
index eac4345657ed1727eed327b2df899a0dddc33a5f..222b766b5d6d51d8ce6d491e813993a2b606fc9b 100644
--- a/ui/message_center/notification_list.cc
+++ b/ui/message_center/notification_list.cc
@@ -100,8 +100,10 @@ void NotificationList::UpdateNotificationMessage(
// Handles priority promotion. If the notification is already dismissed but
// the updated notification has higher priority, it should re-appear as a
- // toast.
- if ((*iter)->priority() < new_notification->priority()) {
+ // toast. Notifications coming from websites through the Web Notification API
+ // will always re-appear on update.
+ if ((*iter)->priority() < new_notification->priority() ||
+ new_notification->notifier_id().type == NotifierId::WEB_PAGE) {
new_notification->set_is_read(false);
new_notification->set_shown_as_popup(false);
}
« no previous file with comments | « chrome/browser/notifications/notification_browsertest.cc ('k') | ui/message_center/notification_list_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698