Index: ui/message_center/views/message_popup_collection.cc |
diff --git a/ui/message_center/views/message_popup_collection.cc b/ui/message_center/views/message_popup_collection.cc |
index fb4cef90ae5dd97c08cb45ba28f54bed8ba812ca..4dd70a47128b9b0cefa16addbc37a5c531cfb362 100644 |
--- a/ui/message_center/views/message_popup_collection.cc |
+++ b/ui/message_center/views/message_popup_collection.cc |
@@ -450,20 +450,22 @@ void MessagePopupCollection::OnNotificationUpdated( |
for (NotificationList::PopupNotifications::iterator iter = |
notifications.begin(); iter != notifications.end(); ++iter) { |
- if ((*iter)->id() != notification_id) |
+ Notification* notification = *iter; |
+ DCHECK(notification); |
+ ToastContentsView* toast_contents_view = *toast_iter; |
+ DCHECK(toast_contents_view); |
+ |
+ if (notification->id() != notification_id) |
continue; |
const RichNotificationData& optional_fields = |
- (*iter)->rich_notification_data(); |
+ notification->rich_notification_data(); |
bool a11y_feedback_for_updates = |
optional_fields.should_make_spoken_feedback_for_popup_updates; |
- NotificationView* view = |
- NotificationView::Create(*toast_iter, |
- *(*iter), |
- true); // Create top-level notification. |
- view->set_context_menu_controller(context_menu_controller_.get()); |
- (*toast_iter)->SetContents(view, a11y_feedback_for_updates); |
+ toast_contents_view->UpdateContents(*notification, |
+ a11y_feedback_for_updates); |
+ |
updated = true; |
} |