Commit 1ba7352f authored by Lei Zhang's avatar Lei Zhang Committed by Commit Bot

Printing: Fix regression with system dialogs on Windows.

This effectively reverts one file in r551457 which was confusing. Add a
comment to explain what is going on.

BUG=834172

Change-Id: I27279382d1b6bbc08688a31a3dc308a791bbc37f
Reviewed-on: https://chromium-review.googlesource.com/1020068Reviewed-by: default avatarSean Kau <skau@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
Cr-Commit-Position: refs/heads/master@{#552492}
parent daf20744
...@@ -37,10 +37,13 @@ void AssignResult(PrintingContext::Result* out, PrintingContext::Result in) { ...@@ -37,10 +37,13 @@ void AssignResult(PrintingContext::Result* out, PrintingContext::Result in) {
// static // static
std::unique_ptr<PrintingContext> PrintingContext::Create(Delegate* delegate) { std::unique_ptr<PrintingContext> PrintingContext::Create(Delegate* delegate) {
#if BUILDFLAG(ENABLE_PRINT_PREVIEW) #if BUILDFLAG(ENABLE_PRINTING)
return base::WrapUnique(new PrintingContextWin(delegate));
#else
return base::WrapUnique(new PrintingContextSystemDialogWin(delegate)); return base::WrapUnique(new PrintingContextSystemDialogWin(delegate));
#else
// The code in printing/ is still built when the GN |enable_basic_printing|
// variable is set to false. Just return PrintingContextWin as a dummy
// context.
return base::WrapUnique(new PrintingContextWin(delegate));
#endif #endif
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment