| 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 532f525086eaad74a168d2a3eee6408c2544d2a6..be62ebf1ec948168361245f6110112d7e9a6b55e 100644
|
| --- a/chrome/browser/download/download_request_limiter.cc
|
| +++ b/chrome/browser/download/download_request_limiter.cc
|
| @@ -8,7 +8,6 @@
|
| #include "base/stl_util.h"
|
| #include "chrome/browser/content_settings/tab_specific_content_settings.h"
|
| #include "chrome/browser/download/download_permission_request.h"
|
| -#include "chrome/browser/download/download_request_infobar_delegate.h"
|
| #include "chrome/browser/infobars/infobar_service.h"
|
| #include "chrome/browser/profiles/profile.h"
|
| #include "chrome/browser/tab_contents/tab_util.h"
|
| @@ -26,6 +25,10 @@
|
| #include "content/public/browser/web_contents_delegate.h"
|
| #include "url/gurl.h"
|
|
|
| +#if defined(OS_ANDROID)
|
| +#include "chrome/browser/download/download_request_infobar_delegate.h"
|
| +#endif
|
| +
|
| using content::BrowserThread;
|
| using content::NavigationController;
|
| using content::NavigationEntry;
|
| @@ -127,20 +130,19 @@ void DownloadRequestLimiter::TabDownloadState::PromptUserForDownload(
|
| if (is_showing_prompt())
|
| return;
|
|
|
| - if (PermissionBubbleManager::Enabled()) {
|
| - PermissionBubbleManager* bubble_manager =
|
| - PermissionBubbleManager::FromWebContents(web_contents_);
|
| - if (bubble_manager) {
|
| - bubble_manager->AddRequest(new DownloadPermissionRequest(
|
| - factory_.GetWeakPtr()));
|
| - } else {
|
| - Cancel();
|
| - }
|
| - return;
|
| - }
|
| -
|
| +#if defined(OS_ANDROID)
|
| DownloadRequestInfoBarDelegate::Create(
|
| InfoBarService::FromWebContents(web_contents_), factory_.GetWeakPtr());
|
| +#else
|
| + PermissionBubbleManager* bubble_manager =
|
| + PermissionBubbleManager::FromWebContents(web_contents_);
|
| + if (bubble_manager) {
|
| + bubble_manager->AddRequest(new DownloadPermissionRequest(
|
| + factory_.GetWeakPtr()));
|
| + } else {
|
| + Cancel();
|
| + }
|
| +#endif
|
| }
|
|
|
| void DownloadRequestLimiter::TabDownloadState::SetContentSetting(
|
|
|