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

Unified Diff: chrome/browser/download/download_request_limiter.cc

Issue 1459793002: Android: Allow compiling browser without Java UI (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 5 years 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
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 c2d400491032961ffb1ca4ff485059cd1ff40407..4650c7a49485a29a5079650993f624dec33fca98 100644
--- a/chrome/browser/download/download_request_limiter.cc
+++ b/chrome/browser/download/download_request_limiter.cc
@@ -11,6 +11,7 @@
#include "chrome/browser/infobars/infobar_service.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/tab_contents/tab_util.h"
+#include "chrome/common/features.h"
#include "components/content_settings/core/browser/host_content_settings_map.h"
#include "content/public/browser/browser_context.h"
#include "content/public/browser/browser_thread.h"
@@ -24,7 +25,7 @@
#include "content/public/browser/web_contents_delegate.h"
#include "url/gurl.h"
-#if defined(OS_ANDROID)
+#if BUILDFLAG(ANDROID_JAVA_UI)
#include "chrome/browser/download/download_request_infobar_delegate_android.h"
#else
#include "chrome/browser/download/download_permission_request.h"
@@ -99,7 +100,7 @@ void DownloadRequestLimiter::TabDownloadState::DidGetUserGesture() {
return;
}
-#if defined(OS_ANDROID)
+#if BUILDFLAG(ANDROID_JAVA_UI)
bool promptable = InfoBarService::FromWebContents(web_contents()) != nullptr;
#else
bool promptable =
@@ -133,7 +134,7 @@ void DownloadRequestLimiter::TabDownloadState::PromptUserForDownload(
if (is_showing_prompt())
return;
-#if defined(OS_ANDROID)
+#if BUILDFLAG(ANDROID_JAVA_UI)
DownloadRequestInfoBarDelegateAndroid::Create(
InfoBarService::FromWebContents(web_contents_), factory_.GetWeakPtr());
#else

Powered by Google App Engine
This is Rietveld 408576698