Index: chrome/browser/notifications/message_center_notification_manager.cc |
diff --git a/chrome/browser/notifications/message_center_notification_manager.cc b/chrome/browser/notifications/message_center_notification_manager.cc |
index e60cdd6f8c11a0a9b8e80ab4bde751eb77425501..42313f9ea4a1b5c010f6f5071eebb5393f55e817 100644 |
--- a/chrome/browser/notifications/message_center_notification_manager.cc |
+++ b/chrome/browser/notifications/message_center_notification_manager.cc |
@@ -10,6 +10,7 @@ |
#include "base/logging.h" |
#include "base/memory/ptr_util.h" |
#include "build/build_config.h" |
+#include "chrome/browser/browser_process.h" |
#include "chrome/browser/notifications/extension_welcome_notification.h" |
#include "chrome/browser/notifications/extension_welcome_notification_factory.h" |
#include "chrome/browser/notifications/fullscreen_notification_blocker.h" |
@@ -80,6 +81,10 @@ MessageCenterNotificationManager::~MessageCenterNotificationManager() { |
void MessageCenterNotificationManager::Add(const Notification& notification, |
sky
2017/03/28 22:00:34
Would it make more sense for this class to be dest
sammiequon
2017/03/28 23:12:08
It would, but would this cause a bunch of other bu
stevenjb
2017/03/29 00:21:33
I would also be worried about dereferencing errors
|
Profile* profile) { |
+ // We won't have time to process and act on this notification. |
+ if (g_browser_process->IsShuttingDown()) |
+ return; |
+ |
if (Update(notification, profile)) |
return; |