Index: chrome/browser/extensions/api/notifications/extension_notification_display_helper.cc |
diff --git a/chrome/browser/extensions/api/notifications/extension_notification_display_helper.cc b/chrome/browser/extensions/api/notifications/extension_notification_display_helper.cc |
index f6f507d6034c282fc4cfa38829e0b9b9cf2593eb..2882b2102336fbe773c4ab72566ba0bfe3850bd3 100644 |
--- a/chrome/browser/extensions/api/notifications/extension_notification_display_helper.cc |
+++ b/chrome/browser/extensions/api/notifications/extension_notification_display_helper.cc |
@@ -80,10 +80,11 @@ bool ExtensionNotificationDisplayHelper::Close( |
} |
void ExtensionNotificationDisplayHelper::Shutdown() { |
- for (const std::unique_ptr<Notification>& notification : notifications_) { |
- GetDisplayService()->Close(NotificationCommon::EXTENSION, |
- notification->delegate_id()); |
- } |
+ // Do not call GetDisplayService()->Close() here. |
+ // This is called upon profile destruction and closing a notification |
+ // requires a profile. Both the message center and the bridge |
+ // notificatiosn will clean up notifications upon exit so all |
+ // that is needed here is cleaning up the internal state. |
notifications_.clear(); |
} |