| Index: chrome/browser/notifications/stub_notification_display_service.cc
|
| diff --git a/chrome/browser/notifications/stub_notification_display_service.cc b/chrome/browser/notifications/stub_notification_display_service.cc
|
| index 578c43a8b8edc4b0153e7e80186278b5ad1f405b..3a94e79456643c788fceb77fe0e080b92c10ff02 100644
|
| --- a/chrome/browser/notifications/stub_notification_display_service.cc
|
| +++ b/chrome/browser/notifications/stub_notification_display_service.cc
|
| @@ -7,7 +7,6 @@
|
| #include <algorithm>
|
|
|
| #include "base/memory/ptr_util.h"
|
| -#include "chrome/browser/notifications/notification_handler.h"
|
| #include "chrome/browser/profiles/profile.h"
|
|
|
| // static
|
| @@ -18,7 +17,7 @@
|
| }
|
|
|
| StubNotificationDisplayService::StubNotificationDisplayService(Profile* profile)
|
| - : NotificationDisplayService(profile), profile_(profile) {}
|
| + : NotificationDisplayService(profile) {}
|
|
|
| StubNotificationDisplayService::~StubNotificationDisplayService() = default;
|
|
|
| @@ -36,22 +35,20 @@
|
| if (iter == notifications_.end())
|
| return;
|
|
|
| - NotificationHandler* handler = GetNotificationHandler(notification_type);
|
| - DCHECK(handler);
|
| - handler->OnClose(profile_, iter->second.origin_url().spec(), notification_id,
|
| - by_user);
|
| + // TODO(peter): Invoke the handlers when that has been generalized.
|
| + iter->second.delegate()->Close(by_user);
|
| +
|
| notifications_.erase(iter);
|
| }
|
|
|
| void StubNotificationDisplayService::RemoveAllNotifications(
|
| NotificationCommon::Type notification_type,
|
| bool by_user) {
|
| - NotificationHandler* handler = GetNotificationHandler(notification_type);
|
| - DCHECK(handler);
|
| for (auto iter = notifications_.begin(); iter != notifications_.end();) {
|
| if (iter->first == notification_type) {
|
| - handler->OnClose(profile_, iter->second.origin_url().spec(),
|
| - iter->second.id(), by_user);
|
| + // TODO(peter): Invoke the handlers when that has been generalized.
|
| + iter->second.delegate()->Close(by_user);
|
| +
|
| iter = notifications_.erase(iter);
|
| } else {
|
| iter++;
|
|
|