0
Files
src/printing
Alan Screen 8f86e143a6 Expose print backend result code
Introduce an error result code to the print mojom definition.  This can
be used to distill system errors down to a subset of conditions which
higher level printing code is interested in.

When the print driver interactions happen in a utility process then the
browser process no longer has the capability to inspect such error
numbers.  While such particulars have not been historically of interest
for printing, there is now interest to know if this failure is because
the sandboxed utility process is too tightly locked down for a
particular driver.  The browser process could choose to do some fallback
processing in such cases.  (Such fallback processing will be in a
forthcoming CL.)

Update the API of queries EnumeratePrinters(), GetPrinterBasicInfo(),
GetPrinterSemanticCapsAndDefaults(), and GetPrinterCapsAndDefaults() to
return this result code instead of a bool.  This will enable this status
to be cleanup propagated to callers.

Include specific error code classification in TestPrintBackend to
support testing for the different result codes, in particular for
access-denied errors.

For real print backend instances, include initial support for
originating kAccessDenied on Windows.  It isn't known yet how CUPS-based
implementations might have sandbox issues that manifest for only
some drivers, so for now only propagate kFailed when there is an error
with CUPS.

Bug: 809738
Change-Id: I72170452175a9e0e0b17078b7733866840a0d220
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2796126
Commit-Queue: Alan Screen <awscreen@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
Reviewed-by: danakj <danakj@chromium.org>
Reviewed-by: Daniel Hosseinian <dhoss@chromium.org>
Cr-Commit-Position: refs/heads/master@{#880313}
2021-05-07 09:52:19 +00:00
..
2021-05-07 09:52:19 +00:00
2021-05-07 09:52:19 +00:00
2021-04-27 18:11:24 +00:00
2021-04-27 18:11:24 +00:00