From f95f642fa50f37a1367b30d9879e0376a2f47644 Mon Sep 17 00:00:00 2001 From: samartnik Date: Wed, 30 Mar 2022 13:44:18 -0400 Subject: [PATCH] [Android] WebUI: Exclude unnecessary build tasks from Android and iOS MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Chromium change: https://github.com/chromium/chromium/commit/c996ee52684e17a1e4685e7d7ac3eaa377be76a8 [Reland] WebUI: Exclude unnecessary build tasks from Android and iOS … …builds. Added assertions to make sure that cr_elements/BUILD.gn and cr_components/BUILD.gn are not loaded at all in Android/iOS builds. These folders hold Polymer elements, which are not relevant for Android/iOS since Polymer is not used (and not shipped) on those platforms. Those assertions revealed a bunch of places were unnecessary work was triggered on Android/iOS builds, and had to be fixed. These were originally discovered as part of migrating various shared WebUI elements to TypeScript (through bot failures). Bug: 1189595 --- browser/ui/sidebar/BUILD.gn | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/browser/ui/sidebar/BUILD.gn b/browser/ui/sidebar/BUILD.gn index 9ddab60c8f0..678672163fc 100644 --- a/browser/ui/sidebar/BUILD.gn +++ b/browser/ui/sidebar/BUILD.gn @@ -53,10 +53,13 @@ source_set("sidebar") { "//chrome/browser/cart:mojo_bindings", "//chrome/browser/new_tab_page/modules/drive:mojo_bindings", "//chrome/browser/new_tab_page/modules/task_module:mojo_bindings", - "//chrome/browser/ui/webui/new_tab_page:mojo_bindings", "//chrome/browser/ui/webui/realbox:mojo_bindings", "//ui/webui/resources/js/browser_command:mojo_bindings", ] + + if (!is_android && !is_ios) { + deps += [ "//chrome/browser/ui/webui/new_tab_page:mojo_bindings" ] + } } source_set("browser_tests") {