Index: chrome/browser/notifications/notification_test_util.cc |
diff --git a/chrome/browser/notifications/notification_test_util.cc b/chrome/browser/notifications/notification_test_util.cc |
index 491c54e7ff1ccc1657b06a5dcc0304effdaa93e1..f9c31b6a7d02708a0264c0c5284a5096e165a087 100644 |
--- a/chrome/browser/notifications/notification_test_util.cc |
+++ b/chrome/browser/notifications/notification_test_util.cc |
@@ -52,6 +52,9 @@ bool StubNotificationUIManager::SilentDismissById( |
void StubNotificationUIManager::Add(const Notification& notification, |
Profile* profile) { |
+ if (is_shutdown_started_) |
+ return; |
+ |
notifications_.push_back(std::make_pair( |
notification, NotificationUIManager::GetProfileID(profile))); |
@@ -154,6 +157,11 @@ void StubNotificationUIManager::CancelAll() { |
notifications_.clear(); |
} |
+void StubNotificationUIManager::StartShutdown() { |
+ is_shutdown_started_ = true; |
+ CancelAll(); |
+} |
+ |
FullscreenStateWaiter::FullscreenStateWaiter( |
Browser* browser, bool desired_state) |
: browser_(browser), |