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

Issue 1544603003: [Downloads] Do not store error responses during resumption. (Closed)

Created:
5 years ago by asanka
Modified:
4 years, 10 months ago
Reviewers:
Devlin, svaldez, sky, davidben
CC:
chromium-reviews, asanka, darin-cc_chromium.org, jam
Base URL:
https://chromium.googlesource.com/chromium/src.git@unify-downloader-core
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

[Downloads] Do not store error responses during resumption. If a server or an intermediary sends a redirect, error, or other unexpected response during resumption, don't store it or discard the partial download state. Instead the download item will flag itself as interrupted again and will require an externally initiated Resume() call to try again. Such responses are common where captive portals or other middle boxes are present. If such cases aren't explicitly handled, an untimely resumption attempt could discard partial state. As a side-effect of this patch, downloads will also not discard partial state due to other server errors during resumption (e.g. 500). BUG=7648 R=svaldez@chromium.org, davidben@chromium.org, rdevlin.cronin@chromium.org TBR=sky@chromium.org Committed: https://crrev.com/edb920a2e81a6be07d4ef30da09e3f2e9debe0c1 Cr-Commit-Position: refs/heads/master@{#376625}

Patch Set 1 #

Patch Set 2 : #

Total comments: 13

Patch Set 3 : Restrict changes to redirect handling. #

Patch Set 4 : Catch up with upstream. #

Patch Set 5 : Catch up with upstream changes. #

Patch Set 6 : #

Patch Set 7 : #

Patch Set 8 : #

Unified diffs Side-by-side diffs Delta from patch set Stats (+240 lines, -128 lines) Patch
M chrome/app/generated_resources.grd View 1 2 3 4 5 1 chunk +8 lines, -0 lines 0 comments Download
M chrome/browser/download/download_item_model.cc View 1 2 chunks +7 lines, -0 lines 0 comments Download
M chrome/browser/download/download_item_model_unittest.cc View 1 2 2 chunks +92 lines, -100 lines 0 comments Download
M chrome/common/extensions/api/downloads.idl View 1 1 chunk +1 line, -0 lines 0 comments Download
M components/history/content/browser/content_history_backend_db_unittest.cc View 1 2 3 4 5 6 7 1 chunk +26 lines, -25 lines 0 comments Download
M content/browser/download/download_browsertest.cc View 1 2 3 4 5 1 chunk +61 lines, -0 lines 0 comments Download
M content/browser/download/download_item_impl.cc View 1 2 3 4 5 1 chunk +1 line, -0 lines 0 comments Download
M content/browser/download/download_request_core.h View 1 2 3 4 5 6 3 chunks +10 lines, -1 line 0 comments Download
M content/browser/download/download_request_core.cc View 1 2 3 4 5 6 4 chunks +20 lines, -0 lines 0 comments Download
M content/browser/download/download_resource_handler.cc View 1 2 3 4 5 1 chunk +1 line, -1 line 0 comments Download
M content/browser/download/url_downloader.cc View 1 2 3 4 5 1 chunk +9 lines, -1 line 0 comments Download
M content/public/browser/download_interrupt_reason_values.h View 1 1 chunk +4 lines, -0 lines 0 comments Download

Messages

Total messages: 23 (10 generated)
asanka
PTAL? svaldez: all the things rdevlin.cronin: chrome/common/extensions/api/downloads.idl davidben: content/public/browser/download_interrupt_reason_values.h content/public/test/test_download_request_handler.cc
4 years, 11 months ago (2016-01-13 02:46:04 UTC) #4
svaldez
Took a brief look at the tests, though I didn't verify that the asserts are ...
4 years, 11 months ago (2016-01-13 17:29:18 UTC) #5
Devlin
downloads.idl lgtm
4 years, 11 months ago (2016-01-13 17:39:56 UTC) #6
davidben
On 2016/01/13 02:46:04, asanka wrote: > davidben: > content/public/browser/download_interrupt_reason_values.h > content/public/test/test_download_request_handler.cc lgtm. I didn't look ...
4 years, 11 months ago (2016-01-13 19:48:36 UTC) #7
asanka
I pulled out most of the initiation handling into the resurrected CL at https://codereview.chromium.org/148133007/ . ...
4 years, 10 months ago (2016-01-28 02:24:17 UTC) #8
svaldez
Is this then going to wait on that one? https://codereview.chromium.org/1544603003/diff/20001/chrome/app/generated_resources.grd File chrome/app/generated_resources.grd (right): https://codereview.chromium.org/1544603003/diff/20001/chrome/app/generated_resources.grd#newcode1638 chrome/app/generated_resources.grd:1638: ...
4 years, 10 months ago (2016-01-28 21:53:46 UTC) #9
asanka
Yup. This CL is going to wait on https://codereview.chromium.org/148133007/ . In order to reliably handle ...
4 years, 10 months ago (2016-02-03 03:07:16 UTC) #10
asanka
svaldez: Could you take a look? Things are settling upstream. So I don't expect there ...
4 years, 10 months ago (2016-02-12 16:24:35 UTC) #11
svaldez
lgtm, though you might want to clarify the CL description that this also deals with ...
4 years, 10 months ago (2016-02-12 17:40:52 UTC) #12
asanka
Thanks! TBR += sky: I added the new interrupt reason to the list of values ...
4 years, 10 months ago (2016-02-20 01:38:44 UTC) #16
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1544603003/140001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1544603003/140001
4 years, 10 months ago (2016-02-20 02:47:40 UTC) #19
commit-bot: I haz the power
Committed patchset #8 (id:140001)
4 years, 10 months ago (2016-02-20 05:19:25 UTC) #21
commit-bot: I haz the power
4 years, 10 months ago (2016-02-20 05:20:53 UTC) #23
Message was sent while issue was closed.
Patchset 8 (id:??) landed as
https://crrev.com/edb920a2e81a6be07d4ef30da09e3f2e9debe0c1
Cr-Commit-Position: refs/heads/master@{#376625}

Powered by Google App Engine
This is Rietveld 408576698