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

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: Fix mac tests. 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
« no previous file with comments | « ui/message_center/notification.cc ('k') | ui/message_center/notification_list_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..93a88a89590e2dbd2c95a4247efb4d15034174f2 100644
--- a/ui/message_center/notification_list.cc
+++ b/ui/message_center/notification_list.cc
@@ -315,11 +315,10 @@ void NotificationList::SetQuietModeInternal(bool quiet_mode) {
quiet_mode_ = quiet_mode;
if (quiet_mode_) {
for (Notifications::iterator iter = notifications_.begin();
- iter != notifications_.end(); ++iter) {
- (*iter)->set_is_read(true);
+ iter != notifications_.end();
+ ++iter) {
(*iter)->set_shown_as_popup(true);
}
- unread_count_ = 0;
}
}
@@ -354,10 +353,10 @@ 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)
- ++unread_count_;
+ if (notification->priority() > MIN_PRIORITY)
+ ++unread_count_;
}
// Take ownership. The notification can only be removed from the list
// in EraseNotification(), which will delete it.
« no previous file with comments | « ui/message_center/notification.cc ('k') | ui/message_center/notification_list_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698