[cleanup] Condition definition of print backend constants
The various constants defined in print_backend_consts.h have been defined unconditionally for all platforms. Each of these are only used for particular use cases. Reorganize and condition the constants to only be built for platforms that require them. Change-Id: Ia1a98537ec27bac6d5e8aa13bc5aeb523ecad5c9 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6282845 Reviewed-by: Lei Zhang <thestig@chromium.org> Commit-Queue: Alan Screen <awscreen@chromium.org> Cr-Commit-Position: refs/heads/main@{#1422124}
This commit is contained in:

committed by
Chromium LUCI CQ

parent
c947e6ffb9
commit
033fba1d91
printing/backend
@ -8,13 +8,21 @@
|
||||
|
||||
// TODO(dhoss): Evaluate removing the strings used as keys for
|
||||
// `PrinterBasicInfo.options` in favor of fields in PrinterBasicInfo.
|
||||
|
||||
#if BUILDFLAG(IS_CHROMEOS)
|
||||
const char kCUPSEnterprisePrinter[] = "cupsEnterprisePrinter";
|
||||
const char kDriverInfoTagName[] = "system_driverinfo";
|
||||
const char kDriverNameTagName[] = "printer-make-and-model";
|
||||
const char kLocationTagName[] = "printer-location";
|
||||
const char kValueFalse[] = "false";
|
||||
const char kValueTrue[] = "true";
|
||||
const char kPrinterStatus[] = "printerStatus";
|
||||
#endif // BUILDFLAG(IS_CHROMEOS)
|
||||
|
||||
#if BUILDFLAG(IS_WIN)
|
||||
const char kLocationTagName[] = "printer-location";
|
||||
#endif
|
||||
|
||||
#if BUILDFLAG(USE_CUPS)
|
||||
const char kDriverInfoTagName[] = "system_driverinfo";
|
||||
const char kDriverNameTagName[] = "printer-make-and-model";
|
||||
|
||||
// The following values must match those defined in CUPS.
|
||||
const char kCUPSOptDeviceUri[] = "device-uri";
|
||||
@ -23,3 +31,4 @@ const char kCUPSOptPrinterLocation[] = "printer-location";
|
||||
const char kCUPSOptPrinterMakeAndModel[] = "printer-make-and-model";
|
||||
const char kCUPSOptPrinterType[] = "printer-type";
|
||||
const char kCUPSOptPrinterUriSupported[] = "printer-uri-supported";
|
||||
#endif // BUILDFLAG(USE_CUPS)
|
||||
|
@ -6,14 +6,23 @@
|
||||
#define PRINTING_BACKEND_PRINT_BACKEND_CONSTS_H_
|
||||
|
||||
#include "base/component_export.h"
|
||||
#include "build/build_config.h"
|
||||
#include "printing/buildflags/buildflags.h"
|
||||
|
||||
#if BUILDFLAG(IS_CHROMEOS)
|
||||
COMPONENT_EXPORT(PRINT_BACKEND) extern const char kCUPSEnterprisePrinter[];
|
||||
COMPONENT_EXPORT(PRINT_BACKEND) extern const char kDriverInfoTagName[];
|
||||
COMPONENT_EXPORT(PRINT_BACKEND) extern const char kDriverNameTagName[];
|
||||
COMPONENT_EXPORT(PRINT_BACKEND) extern const char kLocationTagName[];
|
||||
COMPONENT_EXPORT(PRINT_BACKEND) extern const char kValueFalse[];
|
||||
COMPONENT_EXPORT(PRINT_BACKEND) extern const char kValueTrue[];
|
||||
COMPONENT_EXPORT(PRINT_BACKEND) extern const char kPrinterStatus[];
|
||||
#endif // BUILDFLAG(IS_CHROMEOS)
|
||||
|
||||
#if BUILDFLAG(IS_WIN)
|
||||
COMPONENT_EXPORT(PRINT_BACKEND) extern const char kLocationTagName[];
|
||||
#endif
|
||||
|
||||
#if BUILDFLAG(USE_CUPS)
|
||||
COMPONENT_EXPORT(PRINT_BACKEND) extern const char kDriverInfoTagName[];
|
||||
COMPONENT_EXPORT(PRINT_BACKEND) extern const char kDriverNameTagName[];
|
||||
|
||||
// CUPS destination option names.
|
||||
COMPONENT_EXPORT(PRINT_BACKEND) extern const char kCUPSOptDeviceUri[];
|
||||
@ -22,5 +31,6 @@ COMPONENT_EXPORT(PRINT_BACKEND) extern const char kCUPSOptPrinterLocation[];
|
||||
COMPONENT_EXPORT(PRINT_BACKEND) extern const char kCUPSOptPrinterMakeAndModel[];
|
||||
COMPONENT_EXPORT(PRINT_BACKEND) extern const char kCUPSOptPrinterType[];
|
||||
COMPONENT_EXPORT(PRINT_BACKEND) extern const char kCUPSOptPrinterUriSupported[];
|
||||
#endif // BUILDFLAG(USE_CUPS)
|
||||
|
||||
#endif // PRINTING_BACKEND_PRINT_BACKEND_CONSTS_H_
|
||||
|
Reference in New Issue
Block a user