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

Unified Diff: chrome/browser/chrome_quota_permission_context.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 | « no previous file | chrome/browser/geolocation/chrome_geolocation_permission_context.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/chrome_quota_permission_context.cc
diff --git a/chrome/browser/chrome_quota_permission_context.cc b/chrome/browser/chrome_quota_permission_context.cc
index ab1ccceb31e31f60a62807f2dd88d4b23e15073e..fac03db67ca3acf6657597354ab191d5cfb1356d 100644
--- a/chrome/browser/chrome_quota_permission_context.cc
+++ b/chrome/browser/chrome_quota_permission_context.cc
@@ -283,11 +283,13 @@ void ChromeQuotaPermissionContext::RequestQuotaPermission(
if (PermissionBubbleManager::Enabled()) {
PermissionBubbleManager* bubble_manager =
PermissionBubbleManager::FromWebContents(web_contents);
- bubble_manager->AddRequest(new QuotaPermissionRequest(this,
- params.origin_url, params.requested_size, params.user_gesture,
- Profile::FromBrowserContext(web_contents->GetBrowserContext())->
- GetPrefs()->GetString(prefs::kAcceptLanguages),
- callback));
+ if (bubble_manager) {
+ bubble_manager->AddRequest(new QuotaPermissionRequest(this,
+ params.origin_url, params.requested_size, params.user_gesture,
+ Profile::FromBrowserContext(web_contents->GetBrowserContext())->
+ GetPrefs()->GetString(prefs::kAcceptLanguages),
+ callback));
+ }
return;
}
« no previous file with comments | « no previous file | chrome/browser/geolocation/chrome_geolocation_permission_context.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698