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

Unified Diff: chrome/browser/notifications/fullscreen_notification_blocker.cc

Issue 2463383002: Fullscreen Notifications: Fix crash if delegate is NULL (Closed)
Patch Set: Created 4 years, 1 month 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/notifications/fullscreen_notification_blocker.cc
diff --git a/chrome/browser/notifications/fullscreen_notification_blocker.cc b/chrome/browser/notifications/fullscreen_notification_blocker.cc
index c394a5b30e09637ae08be21e041dcb7b55f87288..b555a3d2e31aec82bb9fb0e231264c7a4bcd0f98 100644
--- a/chrome/browser/notifications/fullscreen_notification_blocker.cc
+++ b/chrome/browser/notifications/fullscreen_notification_blocker.cc
@@ -71,8 +71,10 @@ void FullscreenNotificationBlocker::CheckState() {
bool FullscreenNotificationBlocker::ShouldShowNotificationAsPopup(
const message_center::Notification& notification) const {
- bool enabled = !is_fullscreen_mode_ ||
- notification.delegate()->ShouldDisplayOverFullscreen();
+ bool enabled = !is_fullscreen_mode_;
+ if (is_fullscreen_mode_ && notification.delegate())
+ enabled = notification.delegate()->ShouldDisplayOverFullscreen();
+
#if defined(USE_ASH)
if (ash::Shell::HasInstance())
enabled = enabled || ash::system_notifier::ShouldAlwaysShowPopups(
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698