-
tzik authored
In download_to_file mode of resource loading, the resource handler needs to call ResourceDispatcherHostImpl::RegisterDownloadedTempFile when the file is created, and needs to call UnregisterDownloadedTempFile after the client handles the file. Otherwise, the file is deleted before the client uses it. However, MojoAsyncResourceHandler doesn't call them, and that causes layout test failure around XHR with responseType = 'blob'. This CL fixes that by adding the RDTF and UDTF pair, and refactors similar code in AsyncResourceHandler to share the same lifetime management of the downloaded file in ResourceDispatcherHostImpl. BUG=603396, 659917 Review-Url: https://codereview.chromium.org/2503813002 Cr-Commit-Position: refs/heads/master@{#435551}
47a9f9bc