Add handling for downloading attachments in OutOfProcessInstance.
Add message handler HandleSaveAttachmentMessage() for downloading PDF attachments. As the caller of PDFiumEngine::GetAttachmentData(), HandleSaveAttachmentMessage() validates the attachment's index, readability and whether the size is non-zero before calling, and checks whether the returned attachment's size matches the stored attachment size in |doc_attachment_info_list_|. After calling GetAttachmentData() to fetch the attachment's data, HandleSaveAttachmentMessage() posts a reply to save the data to disk. Bug: 177188 Change-Id: I34ad386447cdcb4025d0f545e4ff8b9d3b818659 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2295998 Commit-Queue: Hui Yingst <nigi@chromium.org> Reviewed-by:Lei Zhang <thestig@chromium.org> Cr-Commit-Position: refs/heads/master@{#798865}
Showing
Please register or sign in to comment