| 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 2dbe9307a57429cf5fb9e8e401a3d2157d590d22..e6d1a1a27621a6d04c694324161ef21d543407fa 100644
|
| --- a/chrome/browser/chrome_quota_permission_context.cc
|
| +++ b/chrome/browser/chrome_quota_permission_context.cc
|
| @@ -281,6 +281,17 @@ void ChromeQuotaPermissionContext::RequestQuotaPermission(
|
| return;
|
| }
|
|
|
| + // TODO(gbillock): adapt this to be a better indicator of background page tab.
|
| + InfoBarService* infobar_service =
|
| + InfoBarService::FromWebContents(web_contents);
|
| + if (!infobar_service) {
|
| + // The tab has no infobar service.
|
| + LOG(WARNING) << "Attempt to request quota from a background page: "
|
| + << render_process_id << "," << params.render_view_id;
|
| + DispatchCallbackOnIOThread(callback, QUOTA_PERMISSION_RESPONSE_CANCELLED);
|
| + return;
|
| + }
|
| +
|
| if (PermissionBubbleManager::Enabled()) {
|
| PermissionBubbleManager* bubble_manager =
|
| PermissionBubbleManager::FromWebContents(web_contents);
|
| @@ -294,15 +305,6 @@ void ChromeQuotaPermissionContext::RequestQuotaPermission(
|
| return;
|
| }
|
|
|
| - InfoBarService* infobar_service =
|
| - InfoBarService::FromWebContents(web_contents);
|
| - if (!infobar_service) {
|
| - // The tab has no infobar service.
|
| - LOG(WARNING) << "Attempt to request quota from a background page: "
|
| - << render_process_id << "," << params.render_view_id;
|
| - DispatchCallbackOnIOThread(callback, QUOTA_PERMISSION_RESPONSE_CANCELLED);
|
| - return;
|
| - }
|
| RequestQuotaInfoBarDelegate::Create(
|
| infobar_service, this, params.origin_url, params.requested_size,
|
| Profile::FromBrowserContext(web_contents->GetBrowserContext())->
|
|
|