Index: ash/system/session_length_limit/tray_session_length_limit.cc |
diff --git a/ash/system/session_length_limit/tray_session_length_limit.cc b/ash/system/session_length_limit/tray_session_length_limit.cc |
index af32635bb9b5f1a1036309c53e79d66030b81ad6..90b088d1602e9a9338c27807267aee86f40e403d 100644 |
--- a/ash/system/session_length_limit/tray_session_length_limit.cc |
+++ b/ash/system/session_length_limit/tray_session_length_limit.cc |
@@ -78,6 +78,15 @@ base::string16 FormatRemainingSessionTimeNotification( |
void CreateOrUpdateNotification(const base::TimeDelta& remaining_time, |
bool enable_spoken_feedback) { |
+ message_center::MessageCenter* message_center = |
+ message_center::MessageCenter::Get(); |
+ // If |enable_spoken_feedback| is false, it's just an update of the content, |
+ // which should not create a new one if it's already closed. |
stevenjb
2013/09/09 17:58:03
nit: s/one/notification
Jun Mukai
2013/09/09 19:37:25
Done.
|
+ if (!enable_spoken_feedback && |
+ !message_center->HasNotification(kSessionLengthTimeoutNotificationId)) { |
stevenjb
2013/09/09 17:58:03
This seems awkward; we're effectively using 'enabl
Jun Mukai
2013/09/09 19:37:25
I don't think I need to separate the function / lo
stevenjb
2013/09/09 19:43:07
OK, that's more clear now.
|
+ return; |
+ } |
+ |
ui::ResourceBundle& bundle = ui::ResourceBundle::GetSharedInstance(); |
message_center::RichNotificationData data; |
data.should_make_spoken_feedback_for_popup_updates = enable_spoken_feedback; |