commit | c9a8ae04e06c5a6954068ce9ec301841529a4095 | [log] [tgz] |
---|---|---|
author | Xing Liu <xingliu@google.com> | Fri Aug 20 01:49:35 2021 |
committer | Chromium LUCI CQ <chromium-scoped@luci-project-accounts.iam.gserviceaccount.com> | Fri Aug 20 01:49:35 2021 |
tree | 224be00704281b93abb88ee0992afe5ff6d7ae43 | |
parent | dd04072c1cbb8af781831a606185da0555414ffe [diff] |
Background download: Handle error correctly in NSURLSessionDownloadDelegate. For non http 200 response, NSURLSessionDownloadDelegate will call didFinishDownloadingToURL and write the response body to a cached file, background download service needs to anaylze the status code and treat it as a failure. For actual failure, like non-supported protocols, NSURLSessionDownloadDelegate will call didCompleteWithError with an error object. We need to report failure. Also background download task with the same id is unique. After the completion handler is invoked, we need to invalidateAndCancel the session. Bug: 1240373 Change-Id: I03c96bfe01d2f79d9eea8afa87ae46873c7bea10 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3107858 Reviewed-by: Min Qin <qinmin@chromium.org> Commit-Queue: Xing Liu <xingliu@chromium.org> Cr-Commit-Position: refs/heads/main@{#913589}
Chromium is an open-source browser project that aims to build a safer, faster, and more stable way for all users to experience the web.
The project's web site is https://www.chromium.org.
To check out the source code locally, don't use git clone
! Instead, follow the instructions on how to get the code.
Documentation in the source is rooted in docs/README.md.
Learn how to Get Around the Chromium Source Code Directory Structure .
For historical reasons, there are some small top level directories. Now the guidance is that new top level directories are for product (e.g. Chrome, Android WebView, Ash). Even if these products have multiple executables, the code should be in subdirectories of the product.
If you found a bug, please file it at https://crbug.com/new.