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

Unified Diff: ui/message_center/message_center_impl.cc

Issue 2750853005: Fix crash when removing all notifications by "Clear all" button. (Closed)
Patch Set: Created 3 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
« no previous file with comments | « ui/arc/notification/arc_custom_notification_view.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/message_center/message_center_impl.cc
diff --git a/ui/message_center/message_center_impl.cc b/ui/message_center/message_center_impl.cc
index 0db1a54ba98ca72634d8658c5f1c3bb5e281f31d..4e90822a60c39912172e7c3b82310b7d8c69c271 100644
--- a/ui/message_center/message_center_impl.cc
+++ b/ui/message_center/message_center_impl.cc
@@ -656,8 +656,8 @@ void MessageCenterImpl::RemoveAllNotifications(bool by_user, RemoveType type) {
bool remove_pinned = (type == RemoveType::ALL);
const NotificationBlockers& blockers =
- (type == RemoveType::ALL ? NotificationBlockers() /* empty blockers */
- : blockers_ /* use default blockers */);
+ remove_pinned ? NotificationBlockers() /* empty blockers */
+ : blockers_; /* use default blockers */
const NotificationList::Notifications notifications =
notification_list_->GetVisibleNotifications(blockers);
« no previous file with comments | « ui/arc/notification/arc_custom_notification_view.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698