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

Unified Diff: chrome/browser/dom_distiller/profile_utils.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/dom_distiller/profile_utils.cc
diff --git a/chrome/browser/dom_distiller/profile_utils.cc b/chrome/browser/dom_distiller/profile_utils.cc
index 3eab2bba7a478fd356c9ecacc3665d4d6e161693..a94ade8b90016c4fa744de62e14e14a96e1d8352 100644
--- a/chrome/browser/dom_distiller/profile_utils.cc
+++ b/chrome/browser/dom_distiller/profile_utils.cc
@@ -11,6 +11,7 @@
#include "chrome/browser/profiles/profile.h"
#include "chrome/common/chrome_isolated_world_ids.h"
#include "chrome/common/chrome_switches.h"
+#include "chrome/common/features.h"
#include "components/dom_distiller/content/browser/distiller_javascript_utils.h"
#include "components/dom_distiller/content/browser/distiller_ui_handle.h"
#include "components/dom_distiller/content/browser/dom_distiller_viewer_source.h"
@@ -21,9 +22,9 @@
#include "chrome/browser/ui/webui/print_preview/print_preview_distiller.h"
#endif // defined(ENABLE_PRINT_PREVIEW)
-#if defined(OS_ANDROID)
+#if BUILDFLAG(ANDROID_JAVA_UI)
#include "chrome/browser/android/dom_distiller/distiller_ui_handle_android.h"
-#endif // defined(OS_ANDROID)
+#endif // BUILDFLAG(ANDROID_JAVA_UI)
void RegisterDomDistillerViewerSource(Profile* profile) {
bool enabled_distiller = base::CommandLine::ForCurrentProcess()->HasSwitch(
@@ -42,10 +43,10 @@ void RegisterDomDistillerViewerSource(Profile* profile) {
profile, dom_distiller_service_factory);
scoped_ptr<dom_distiller::DistillerUIHandle> ui_handle;
-#if defined(OS_ANDROID)
+#if BUILDFLAG(ANDROID_JAVA_UI)
ui_handle.reset(
new dom_distiller::android::DistillerUIHandleAndroid());
-#endif // defined(OS_ANDROID)
+#endif // BUILDFLAG(ANDROID_JAVA_UI)
// Set the JavaScript world ID.
if (!dom_distiller::DistillerJavaScriptWorldIdIsSet()) {
« no previous file with comments | « chrome/browser/chrome_content_browser_client.cc ('k') | chrome/browser/download/chrome_download_manager_delegate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698