Skip to content

Commit

Permalink
Correct feature flag for Windows printing with XPS
Browse files Browse the repository at this point in the history
Flag needed to be in printing/common, as flags in components are not
accessible when building other DLLs (such as printing.dll).

Bug: 1008222
Change-Id: I9233b01b7535621afc42f7b65b656ad541ab6a72
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1929913
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Alan Screen <awscreen@chromium.org>
Cr-Commit-Position: refs/heads/master@{#718194}
  • Loading branch information
Alan Screen authored and Commit Bot committed Nov 22, 2019
1 parent 6b947d3 commit c006076
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 10 deletions.
6 changes: 0 additions & 6 deletions components/printing/browser/features.cc
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,6 @@
namespace printing {
namespace features {

#if defined(OS_WIN)
// Use XPS for printing instead of GDI.
const base::Feature kUseXpsForPrinting{"UseXpsForPrinting",
base::FEATURE_DISABLED_BY_DEFAULT};
#endif

#if defined(OS_MACOSX)
const base::Feature kEnableCustomMacPaperSizes{
"EnableCustomMacPaperSizes", base::FEATURE_DISABLED_BY_DEFAULT};
Expand Down
4 changes: 0 additions & 4 deletions components/printing/browser/features.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,6 @@
namespace printing {
namespace features {

#if defined(OS_WIN)
extern const base::Feature kUseXpsForPrinting;
#endif

#if defined(OS_MACOSX)
extern const base::Feature kEnableCustomMacPaperSizes;
#endif
Expand Down
6 changes: 6 additions & 0 deletions printing/common/printing_features.cc
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,11 @@ namespace features {
const base::Feature kHarfBuzzPDFSubsetter{"HarfBuzzPDFSubsetter",
base::FEATURE_ENABLED_BY_DEFAULT};

#if defined(OS_WIN)
// Use XPS for printing instead of GDI.
const base::Feature kUseXpsForPrinting{"UseXpsForPrinting",
base::FEATURE_DISABLED_BY_DEFAULT};
#endif

} // namespace features
} // namespace printing
5 changes: 5 additions & 0 deletions printing/common/printing_features.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,18 @@
#define PRINTING_COMMON_PRINTING_FEATURES_H_

#include "base/feature_list.h"
#include "build/build_config.h"
#include "printing/printing_export.h"

namespace printing {
namespace features {

PRINTING_EXPORT extern const base::Feature kHarfBuzzPDFSubsetter;

#if defined(OS_WIN)
PRINTING_EXPORT extern const base::Feature kUseXpsForPrinting;
#endif

} // namespace features
} // namespace printing

Expand Down

0 comments on commit c006076

Please sign in to comment.