Chromium Code Reviews| 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 d4b81afc9347c1d40a5df5b40e4122c4ae97c42a..903aa97ea8f36755d35ec615eb5e6701f1336f54 100644 |
| --- a/ui/message_center/message_center_impl.cc |
| +++ b/ui/message_center/message_center_impl.cc |
| @@ -616,7 +616,11 @@ void MessageCenterImpl::RemoveNotification(const std::string& id, |
| void MessageCenterImpl::RemoveNotificationImmediately( |
| const std::string& id, bool by_user) { |
| - if (FindVisibleNotificationById(id) == NULL) |
| + message_center::Notification* notification = FindVisibleNotificationById(id); |
|
xiyuan
2016/09/28 19:27:40
nit: "message_center::" is not necessary.
yoshiki
2016/09/30 04:56:10
Done.
|
| + if (notification == NULL) |
| + return; |
| + |
| + if (by_user && notification->pinned()) |
| return; |
| // In many cases |id| is a reference to an existing notification instance |