Cleanup unconditional build usage of //printing
Printing is not supported on Fuchsia yet it has been making use of parts
of //printing. This should not be happening, targets in //printing
should not be used when `enable_basic_printing` is not enabled.
Update printing build to assert that printing is enabled to identify all
possible locations that are doing this and also avoid repeating this
issue in the future.
Update build files to condition dependencies upon printing targets as
necessary. Similarly wrap some utility code with build flag checks
for `ENABLE_PRINTING` to avoid printing-specific code.
Content web test makes use of printing code to print to a bitmap. This
is the scenario which was causing Fuchsia to make use of //printing.
Change this to just return an empty bitmap when printing isn't enabled
so that the dependency isn't relied upon for tests which aren't even
relevant for such a condition.
Bug: 1200443
Change-Id: I0c45e280a4c561a7918b9b103b0b4409fdfeb442
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2844307
Reviewed-by: Will Harris <[email protected]>
Reviewed-by: Robert Sesek <[email protected]>
Reviewed-by: danakj <[email protected]>
Reviewed-by: Matthew Denton <[email protected]>
Reviewed-by: Michael Bai <[email protected]>
Reviewed-by: Alex Moshchuk <[email protected]>
Reviewed-by: Lei Zhang <[email protected]>
Commit-Queue: Alan Screen <[email protected]>
Cr-Commit-Position: refs/heads/master@{#876807}
diff --git a/chrome/browser/BUILD.gn b/chrome/browser/BUILD.gn
index 683dc731..c156512 100644
--- a/chrome/browser/BUILD.gn
+++ b/chrome/browser/BUILD.gn
@@ -1988,7 +1988,6 @@
"//chrome/common:version_header",
"//chrome/common/net",
"//chrome/common/performance_manager/mojom",
- "//chrome/common/printing:printing",
"//chrome/installer/util:with_no_strings",
"//components/assist_ranker",
"//components/autofill/content/browser",
@@ -2133,7 +2132,6 @@
"//components/policy/core/browser",
"//components/policy/proto",
"//components/prefs",
- "//components/printing/browser",
"//components/privacy_sandbox:privacy_sandbox_prefs",
"//components/profile_metrics",
"//components/proxy_config",
@@ -2294,7 +2292,6 @@
"//net",
"//net:extras",
"//ppapi/buildflags",
- "//printing",
"//printing/buildflags",
"//rlz/buildflags",
"//services/audio/public/cpp",
@@ -4198,7 +4195,6 @@
"//components/keep_alive_registry",
"//components/live_caption:constants",
"//components/pref_registry",
- "//components/printing/common:mojo_interfaces",
"//components/services/app_service:lib",
"//components/services/app_service/public/cpp:app_file_handling",
"//components/services/app_service/public/cpp:app_share_target",
@@ -5510,6 +5506,7 @@
"printing/printing_init.h",
]
deps += [
+ "//chrome/common/printing",
"//components/printing/browser",
"//components/printing/common:mojo_interfaces",
"//components/services/print_compositor/public/cpp",