[Android] WebUI: Exclude unnecessary build tasks from Android and iOS

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
This commit is contained in:
samartnik
2022-05-13 18:01:39 +01:00
committed by Claudio DeSouza
parent 782ca97fae
commit f95f642fa5
+4 -1
View File
@@ -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") {