| Index: content/test/mock_platform_notification_service.cc
|
| diff --git a/content/test/mock_platform_notification_service.cc b/content/test/mock_platform_notification_service.cc
|
| index 03fbd7caffb2e08a96036e81b2fa13b8f8b8853f..58db6968fe6370e92f3b5b40d25727755656d135 100644
|
| --- a/content/test/mock_platform_notification_service.cc
|
| +++ b/content/test/mock_platform_notification_service.cc
|
| @@ -164,9 +164,13 @@
|
| void MockPlatformNotificationService::Close(
|
| const std::string& notification_id) {
|
| DCHECK_CURRENTLY_ON(BrowserThread::UI);
|
| - NotificationEventDispatcher::GetInstance()->DispatchNonPersistentCloseEvent(
|
| - notification_id);
|
| - non_persistent_notifications_.erase(notification_id);
|
| + const auto non_persistent_iter =
|
| + non_persistent_notifications_.find(notification_id);
|
| + if (non_persistent_iter == non_persistent_notifications_.end()) {
|
| + NotificationEventDispatcher::GetInstance()->DispatchNonPersistentCloseEvent(
|
| + notification_id);
|
| + non_persistent_notifications_.erase(non_persistent_iter);
|
| + }
|
| }
|
|
|
| void MockPlatformNotificationService::ReplaceNotificationIfNeeded(
|
|
|