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

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

Issue 282693002: Add a null check for PermissionBubbleManager::FromWebcontents. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 7 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
« no previous file with comments | « chrome/browser/media/media_capture_devices_dispatcher.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 bde800ce9cb16ffbe0f3c6af073e3b280f8a60cf..184d3d0910d27be76aafc68ad9aadff120dbfde9 100644
--- a/chrome/browser/notifications/desktop_notification_service.cc
+++ b/chrome/browser/notifications/desktop_notification_service.cc
@@ -514,12 +514,14 @@ void DesktopNotificationService::RequestPermission(
if (PermissionBubbleManager::Enabled()) {
PermissionBubbleManager* bubble_manager =
PermissionBubbleManager::FromWebContents(web_contents);
- bubble_manager->AddRequest(new NotificationPermissionRequest(
- this,
- origin,
- DisplayNameForOriginInProcessId(
- origin, render_frame_host->GetProcess()->GetID()),
- callback));
+ if (bubble_manager) {
+ bubble_manager->AddRequest(new NotificationPermissionRequest(
+ this,
+ origin,
+ DisplayNameForOriginInProcessId(
+ origin, render_frame_host->GetProcess()->GetID()),
+ callback));
+ }
return;
}
« no previous file with comments | « chrome/browser/media/media_capture_devices_dispatcher.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698