diff options
author | tbarzic <tbarzic@chromium.org> | 2015-03-02 23:55:50 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-03-03 07:56:46 +0000 |
commit | 32b8f25cacbefd083b54402e402e280dbe239063 (patch) | |
tree | f72f188fc8c71f908c0360067d6809ddc04a14cb /printing | |
parent | 6dcda57d0800cd1347c63545bc3bb15f250ae716 (diff) | |
download | chromium_src-32b8f25cacbefd083b54402e402e280dbe239063.zip chromium_src-32b8f25cacbefd083b54402e402e280dbe239063.tar.gz chromium_src-32b8f25cacbefd083b54402e402e280dbe239063.tar.bz2 |
Add missing printExtension to print settings for print preview
BUG=461888
Review URL: https://codereview.chromium.org/957123002
Cr-Commit-Position: refs/heads/master@{#318852}
Diffstat (limited to 'printing')
-rw-r--r-- | printing/printing_context.cc | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/printing/printing_context.cc b/printing/printing_context.cc index a589900..9748a17 100644 --- a/printing/printing_context.cc +++ b/printing/printing_context.cc @@ -63,6 +63,7 @@ PrintingContext::Result PrintingContext::UsePdfSettings() { pdf_settings->SetBoolean(kSettingPrintToPDF, true); pdf_settings->SetBoolean(kSettingCloudPrintDialog, false); pdf_settings->SetBoolean(kSettingPrintWithPrivet, false); + pdf_settings->SetBoolean(kSettingPrintWithExtension, false); return UpdatePrintSettings(*pdf_settings); } @@ -78,10 +79,13 @@ PrintingContext::Result PrintingContext::UpdatePrintSettings( bool print_to_pdf = false; bool is_cloud_dialog = false; bool print_with_privet = false; + bool print_with_extension = false; if (!job_settings.GetBoolean(kSettingPrintToPDF, &print_to_pdf) || !job_settings.GetBoolean(kSettingCloudPrintDialog, &is_cloud_dialog) || - !job_settings.GetBoolean(kSettingPrintWithPrivet, &print_with_privet)) { + !job_settings.GetBoolean(kSettingPrintWithPrivet, &print_with_privet) || + !job_settings.GetBoolean(kSettingPrintWithExtension, + &print_with_extension)) { NOTREACHED(); return OnError(); } @@ -90,8 +94,9 @@ PrintingContext::Result PrintingContext::UpdatePrintSettings( bool open_in_external_preview = job_settings.HasKey(kSettingOpenPDFInPreview); - if (!open_in_external_preview && (print_to_pdf || print_to_cloud || - is_cloud_dialog || print_with_privet)) { + if (!open_in_external_preview && + (print_to_pdf || print_to_cloud || is_cloud_dialog || print_with_privet || + print_with_extension)) { settings_.set_dpi(kDefaultPdfDpi); gfx::Size paper_size(GetPdfPaperSizeDeviceUnits()); if (!settings_.requested_media().size_microns.IsEmpty()) { |