Download location: Fix an issue in file writing.
When we write to a file, currently we assume the whole chunk is written. However when users pull out the SD card or disk, base::File::Write will return a size less than the chunk size, and the next call to base::File::Write will return an error. This CL fixed this issue so FILE_FAILED error can be correctly reported when the SD card is unmounted. This CL basically makes the core write function back to this revision: https://chromium.googlesource.com/chromium/src/+/29db19d0c973a8990283ec4b81111db5bdb8d2de/content/browser/download/base_file.cc#101 Bug: 841559,792775 Change-Id: Icfba65833bf3aec07d30d8d3bed57a9abba7f8d1 Reviewed-on: https://chromium-review.googlesource.com/1053233 Commit-Queue: Xing Liu <xingliu@chromium.org> Reviewed-by:David Trainor <dtrainor@chromium.org> Cr-Commit-Position: refs/heads/master@{#557903}
Showing
Please register or sign in to comment