| 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 b4921431e12595e294d3105bb2d020f0d1e9d2cd..6f39a9b796c89fe8f5a168bdb400a28bc86107c3 100644
|
| --- a/chrome/browser/chrome_quota_permission_context.cc
|
| +++ b/chrome/browser/chrome_quota_permission_context.cc
|
| @@ -21,6 +21,7 @@
|
| #include "content/public/browser/browser_thread.h"
|
| #include "content/public/browser/navigation_details.h"
|
| #include "content/public/browser/web_contents.h"
|
| +#include "device/vr/features/features.h"
|
| #include "storage/common/quota/quota_types.h"
|
| #include "ui/base/l10n/l10n_util.h"
|
| #include "url/gurl.h"
|
| @@ -30,9 +31,14 @@
|
| #include "chrome/browser/infobars/infobar_service.h"
|
| #include "components/infobars/core/confirm_infobar_delegate.h"
|
| #include "components/infobars/core/infobar.h"
|
| +
|
| +#if BUILDFLAG(ENABLE_VR)
|
| +#include "chrome/browser/android/vr_shell/vr_tab_helper.h"
|
| +#endif // BUILDFLAG(ENABLE_VR)
|
| +
|
| #else
|
| #include "ui/vector_icons/vector_icons.h"
|
| -#endif
|
| +#endif // defined(OS_ANDROID)
|
|
|
| namespace {
|
|
|
| @@ -282,6 +288,15 @@ void ChromeQuotaPermissionContext::RequestQuotaPermission(
|
| return;
|
| }
|
|
|
| +#if BUILDFLAG(ENABLE_VR) && defined(OS_ANDROID)
|
| + if (vr_shell::VrTabHelper::IsInVr(web_contents)) {
|
| + LOG(WARNING) << "Attempt to request quota from VR: "
|
| + << render_process_id << "," << params.render_frame_id;
|
| + DispatchCallbackOnIOThread(callback, QUOTA_PERMISSION_RESPONSE_CANCELLED);
|
| + return;
|
| + }
|
| +#endif
|
| +
|
| if (PermissionRequestManager::IsEnabled()) {
|
| PermissionRequestManager* permission_request_manager =
|
| PermissionRequestManager::FromWebContents(web_contents);
|
|
|