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

Unified Diff: ui/message_center/message_center_impl.cc

Issue 2371693002: Not remove a pinned notification by user action (Closed)
Patch Set: Created 4 years, 3 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 | « no previous file | 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 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698