Commit b52144f5 authored by Naoki Fukino's avatar Naoki Fukino Committed by Commit Bot

Print Preview: Requires native paths to write PDF files.

Fixing a regression by https://codereview.chromium.org/2952043002/.
Print Preview requires native paths to write PDF files.
I explicitly set NATIVE_PATH as the restriction for save-as dialog, and added a comment about the
Google Drive handling of Chrome OS save-as dialog as it is a bit tricky.

Bug: 761576
Change-Id: Ibabd428e26cfd0d96a1f65dadc5c0fa4b565e956
Reviewed-on: https://chromium-review.googlesource.com/662920Reviewed-by: default avatarLei Zhang <thestig@chromium.org>
Reviewed-by: default avatarRyo Hashimoto <hashimoto@chromium.org>
Commit-Queue: Naoki Fukino <fukino@chromium.org>
Cr-Commit-Position: refs/heads/master@{#501541}
parent b36015c8
......@@ -1429,8 +1429,13 @@ void PrintPreviewHandler::OnDirectoryCreated(const base::FilePath& path) {
file_type_info.extensions.resize(1);
file_type_info.extensions[0].push_back(FILE_PATH_LITERAL("pdf"));
file_type_info.include_all_files = true;
// Print Preview requires native paths to write PDF files.
// Note that Chrome OS save-as dialog has Google Drive as a saving location
// even when a client requires native paths. In this case, Chrome OS save-as
// dialog returns native paths to write files and uploads the saved files to
// Google Drive later.
file_type_info.allowed_paths =
ui::SelectFileDialog::FileTypeInfo::NATIVE_OR_DRIVE_PATH;
ui::SelectFileDialog::FileTypeInfo::NATIVE_PATH;
select_file_dialog_ =
ui::SelectFileDialog::Create(this, nullptr /*policy already checked*/);
......
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