| Index: chrome/browser/download/download_request_limiter.cc
|
| diff --git a/chrome/browser/download/download_request_limiter.cc b/chrome/browser/download/download_request_limiter.cc
|
| index ce379f77174df39fe5521891d3b984b4b16b0154..8206c8182a72f9e001e5a5bb0ccb6688ed7fc304 100644
|
| --- a/chrome/browser/download/download_request_limiter.cc
|
| +++ b/chrome/browser/download/download_request_limiter.cc
|
| @@ -25,11 +25,17 @@
|
| #include "content/public/browser/resource_dispatcher_host.h"
|
| #include "content/public/browser/web_contents.h"
|
| #include "content/public/browser/web_contents_delegate.h"
|
| +#include "device/vr/features/features.h"
|
| #include "url/gurl.h"
|
|
|
| #if defined(OS_ANDROID)
|
| #include "chrome/browser/download/download_request_infobar_delegate_android.h"
|
| -#endif
|
| +
|
| +#if BUILDFLAG(ENABLE_VR)
|
| +#include "chrome/browser/android/vr_shell/vr_tab_helper.h"
|
| +#endif // BUILDFLAG(ENABLE_VR)
|
| +
|
| +#endif // defined(OS_ANDROID)
|
|
|
| using content::BrowserThread;
|
| using content::NavigationController;
|
| @@ -208,6 +214,13 @@ void DownloadRequestLimiter::TabDownloadState::PromptUserForDownload(
|
| if (is_showing_prompt())
|
| return;
|
|
|
| +#if BUILDFLAG(ENABLE_VR) && defined(OS_ANDROID)
|
| + if (vr_shell::VrTabHelper::IsInVr(web_contents_)) {
|
| + Cancel();
|
| + return;
|
| + }
|
| +#endif
|
| +
|
| if (PermissionRequestManager::IsEnabled()) {
|
| PermissionRequestManager* permission_request_manager =
|
| PermissionRequestManager::FromWebContents(web_contents_);
|
|
|