| Index: ui/message_center/popup_timer.cc
|
| diff --git a/ui/message_center/popup_timer.cc b/ui/message_center/popup_timer.cc
|
| index aa45d06d43cbdfbd1aa452fa0e4bd61731a3bd2c..f2f9c5e015bbde89e53dbb257cd6a1f65028a7a8 100644
|
| --- a/ui/message_center/popup_timer.cc
|
| +++ b/ui/message_center/popup_timer.cc
|
| @@ -11,21 +11,20 @@
|
| #include "ui/message_center/notification.h"
|
| #include "ui/message_center/notification_list.h"
|
|
|
| +namespace message_center {
|
| +
|
| namespace {
|
|
|
| -base::TimeDelta GetTimeoutForPriority(int priority) {
|
| - if (priority > message_center::DEFAULT_PRIORITY) {
|
| - return base::TimeDelta::FromSeconds(
|
| - message_center::kAutocloseHighPriorityDelaySeconds);
|
| - }
|
| - return base::TimeDelta::FromSeconds(
|
| - message_center::kAutocloseDefaultDelaySeconds);
|
| +base::TimeDelta GetTimeoutForNotification(Notification* notification) {
|
| + if (notification->priority() > message_center::DEFAULT_PRIORITY)
|
| + return base::TimeDelta::FromSeconds(kAutocloseHighPriorityDelaySeconds);
|
| + if (notification->is_web_notification())
|
| + return base::TimeDelta::FromSeconds(kAutocloseWebNotificationDelaySeconds);
|
| + return base::TimeDelta::FromSeconds(kAutocloseDefaultDelaySeconds);
|
| }
|
|
|
| } // namespace
|
|
|
| -namespace message_center {
|
| -
|
| ////////////////////////////////////////////////////////////////////////////////
|
| // PopupTimer
|
|
|
| @@ -165,7 +164,7 @@ void PopupTimersController::OnNotificationUpdated(const std::string& id) {
|
|
|
| // Start the timer if not yet.
|
| if (popup_timers_.find(id) == popup_timers_.end())
|
| - StartTimer(id, GetTimeoutForPriority((*iter)->priority()));
|
| + StartTimer(id, GetTimeoutForNotification(*iter));
|
| }
|
|
|
| void PopupTimersController::OnNotificationRemoved(const std::string& id,
|
|
|