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

Unified Diff: ui/message_center/notification_list.cc

Issue 21308002: Update Mac notification tray behavior. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 5 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 8f1bc9f67e6d3b9c0d3a83754465529695110f7b..501212ef7e149ef11ecb4c6c7e749e599195806b 100644
--- a/ui/message_center/notification_list.cc
+++ b/ui/message_center/notification_list.cc
@@ -316,10 +316,8 @@ void NotificationList::SetQuietModeInternal(bool quiet_mode) {
if (quiet_mode_) {
for (Notifications::iterator iter = notifications_.begin();
iter != notifications_.end(); ++iter) {
- (*iter)->set_is_read(true);
(*iter)->set_shown_as_popup(true);
}
- unread_count_ = 0;
}
}
@@ -354,9 +352,9 @@ void NotificationList::PushNotification(scoped_ptr<Notification> notification) {
if (!state_inherited) {
// TODO(mukai): needs to distinguish if a notification is dismissed by
// the quiet mode or user operation.
- notification->set_is_read(quiet_mode_);
+ notification->set_is_read(false);
notification->set_shown_as_popup(message_center_visible_ || quiet_mode_);
- if (!quiet_mode_ && notification->priority() > MIN_PRIORITY)
+ if (notification->priority() > MIN_PRIORITY)
++unread_count_;
}
// Take ownership. The notification can only be removed from the list

Powered by Google App Engine
This is Rietveld 408576698