chore: add logging for print_backend failures (#29884)

This commit is contained in:
Shelley Vohr 2021-10-05 09:16:04 +02:00 committed by GitHub
parent d7a7c120d1
commit d2508a6941
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 30 additions and 12 deletions

View file

@ -47,7 +47,10 @@ printing::PrinterList GetPrinterList() {
// TODO(deepak1556): Deprecate this api in favor of an
// async version and post a non blocing task call.
base::ThreadRestrictions::ScopedAllowIO allow_io;
print_backend->EnumeratePrinters(&printers);
printing::mojom::ResultCode code =
print_backend->EnumeratePrinters(&printers);
if (code != printing::mojom::ResultCode::kSuccess)
LOG(INFO) << "Failed to enumerate printers";
}
return printers;
}