Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(290)

Issue 2828073002: Fix an issue that we didn't clean url request properly. (Closed)

Created:
3 years, 8 months ago by xingliu
Modified:
3 years, 8 months ago
Reviewers:
CC:
chromium-reviews
Target Ref:
refs/branch-heads/3071
Project:
chromium
Visibility:
Public.

Description

Fix an issue that we didn't clean url request properly. The ByteStreamReader we used in DownloadFile does not support Close() api, so we need to close the url request on UI thread if "ByteStreamReader::Close" should be called. Before we implement parallel download, we null out the callback on ByteStreamReader during download interruption, and on UI thread, we cancel the url request. But for parallel download, at some point, we won't interrupt the download but need to cancel a particular request. There is another CL that implements a browser test for parallel download and it will test the code here. https://codereview.chromium.org/2819483002/ BUG=710576, 644352 Review-Url: https://codereview.chromium.org/2811293004 Cr-Commit-Position: refs/heads/master@{#465289} (cherry picked from commit b444a98187571cf9ec627ac52fee7e81ffcecb93) Review-Url: https://codereview.chromium.org/2828073002 . Cr-Commit-Position: refs/branch-heads/3071@{#60} Cr-Branched-From: a106f0abbf69dad349d4aaf4bcc4f5d376dd2377-refs/heads/master@{#464641} Committed: https://chromium.googlesource.com/chromium/src/+/8cb70eaa5ea6568193561a95fc04bdcd4cd8fe4b

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+94 lines, -31 lines) Patch
M content/browser/download/download_browsertest.cc View 1 chunk +3 lines, -1 line 0 comments Download
M content/browser/download/download_file.h View 1 chunk +7 lines, -2 lines 0 comments Download
M content/browser/download/download_file_impl.h View 4 chunks +9 lines, -2 lines 0 comments Download
M content/browser/download/download_file_impl.cc View 7 chunks +19 lines, -5 lines 0 comments Download
M content/browser/download/download_file_unittest.cc View 1 chunk +1 line, -1 line 0 comments Download
M content/browser/download/download_item_impl.h View 1 chunk +3 lines, -0 lines 0 comments Download
M content/browser/download/download_item_impl.cc View 2 chunks +8 lines, -0 lines 0 comments Download
M content/browser/download/download_item_impl_unittest.cc View 7 chunks +7 lines, -7 lines 0 comments Download
M content/browser/download/download_job.h View 1 chunk +4 lines, -0 lines 0 comments Download
M content/browser/download/download_job.cc View 1 chunk +2 lines, -0 lines 0 comments Download
M content/browser/download/mock_download_file.h View 1 chunk +2 lines, -1 line 0 comments Download
M content/browser/download/mock_download_file.cc View 2 chunks +7 lines, -4 lines 0 comments Download
M content/browser/download/parallel_download_job.h View 1 chunk +1 line, -0 lines 0 comments Download
M content/browser/download/parallel_download_job.cc View 1 chunk +11 lines, -0 lines 0 comments Download
M content/public/test/test_file_error_injector.cc View 3 chunks +10 lines, -8 lines 0 comments Download

Messages

Total messages: 2 (1 generated)
xingliu
3 years, 8 months ago (2017-04-19 18:38:34 UTC) #2
Message was sent while issue was closed.
Committed patchset #1 (id:1) manually as
8cb70eaa5ea6568193561a95fc04bdcd4cd8fe4b.

Powered by Google App Engine
This is Rietveld 408576698