Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(68)

Unified Diff: chrome/browser/notifications/message_center_notification_manager.h

Issue 2776933006: CrOS: Do not allow notifications to be added during shutdown. (Closed)
Patch Set: Trybots. Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/notifications/message_center_notification_manager.h
diff --git a/chrome/browser/notifications/message_center_notification_manager.h b/chrome/browser/notifications/message_center_notification_manager.h
index 589633e44c7c4911dbd6589a88fc562d7c6a2a32..67063b1f314018999ac8e841260e00d9c98deae8 100644
--- a/chrome/browser/notifications/message_center_notification_manager.h
+++ b/chrome/browser/notifications/message_center_notification_manager.h
@@ -59,6 +59,7 @@ class MessageCenterNotificationManager
bool CancelAllBySourceOrigin(const GURL& source_origin) override;
bool CancelAllByProfile(ProfileID profile_id) override;
void CancelAll() override;
+ void StartShutdown() override;
// MessageCenterObserver
void OnNotificationRemoved(const std::string& notification_id,
@@ -108,6 +109,9 @@ class MessageCenterNotificationManager
// Keeps track of all notification statistics for UMA purposes.
MessageCenterStatsCollector stats_collector_;
+ // Tracks if shutdown has started.
+ bool is_shutdown_started_ = false;
+
DISALLOW_COPY_AND_ASSIGN(MessageCenterNotificationManager);
};

Powered by Google App Engine
This is Rietveld 408576698