Index: chrome/browser/notifications/desktop_notification_service.cc |
diff --git a/chrome/browser/notifications/desktop_notification_service.cc b/chrome/browser/notifications/desktop_notification_service.cc |
index 2568fb5727ac8805f7336617e69c1ee740df6275..7e2b458e305db9e5a9f10cdb718136cf5c9f638f 100644 |
--- a/chrome/browser/notifications/desktop_notification_service.cc |
+++ b/chrome/browser/notifications/desktop_notification_service.cc |
@@ -276,7 +276,8 @@ void DesktopNotificationService::RemoveNotification( |
g_browser_process->notification_ui_manager()->CancelById(notification_id); |
} |
-DesktopNotificationService::DesktopNotificationService(Profile* profile, |
+DesktopNotificationService::DesktopNotificationService( |
+ Profile* profile, |
NotificationUIManager* ui_manager) |
: profile_(profile), |
ui_manager_(ui_manager) { |
@@ -338,6 +339,10 @@ void DesktopNotificationService::Observe( |
CancelAllBySourceOrigin(extension->url()); |
} |
} else if (type == chrome::NOTIFICATION_PROFILE_DESTROYED) { |
+ if (g_browser_process && g_browser_process->notification_ui_manager()) { |
+ g_browser_process->notification_ui_manager()-> |
+ CancelAllByProfile(profile_); |
+ } |
StopObserving(); |
} |
} |