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

Issue 1544653002: [Download] Treat RESUMING_INTERNAL as IN_PROGRESS in DownloadItem. (Closed)

Created:
5 years ago by asanka
Modified:
5 years ago
Reviewers:
svaldez
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

[Download] Treat RESUMING_INTERNAL as IN_PROGRESS in DownloadItem. The RESUMING_INTERNAL state is used to indicate that the DownloadItem has commenced a resumption attempt. The DownloadItem will remain in this state until the network request receives a response. Formerly, we treated this internal state as INTERRUPTED for all entities that are observing the download item, including the UI. However, in retrospect, this doesn't make sense and prevents the DownloadItem from cleanly handling cases where it needs to transition back to an interrupted state following a resumption attempt. In the latter case, the download would otherwise try to transition from INTERRUPTED -> INTERRUPTED which doesn't make a whole lot of sense to an outside observer. In addition, keeping the download in the INTERRUPTED state prevents an outside observer from being able to cleanly tell when a resumption attempt has begun. Furthermore, the INTERRUPTED state exhibited while an automatic resumption is being attempted is not actionable to all outside observers. To rectify these, this change makes the RESUMING_INTERNAL state be visible to external observers as IN_PROGRESS. BUG=7648 R=svaldez@chromium.org Committed: https://crrev.com/ad29c15e3115a256cec6ee0ab0ba3138ef087569 Cr-Commit-Position: refs/heads/master@{#366542} Reverted due to failure in XP bots. Reverted: https://crrev.com/5a45da8d4a87ffc6100ab8b684f3ad2eaef639b4 Cr-Commit-Position: refs/heads/master@{#366574} Committed: https://crrev.com/0af68969edff080ce4298756432341b6cd7ddc5d Cr-Commit-Position: refs/heads/master@{#366681}

Patch Set 1 #

Total comments: 9

Patch Set 2 : Address comments. #

Patch Set 3 : Establishing dependency on other fixes. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+16 lines, -13 lines) Patch
M content/browser/download/download_item_impl.cc View 1 chunk +1 line, -1 line 0 comments Download
M content/browser/download/download_item_impl_unittest.cc View 1 8 chunks +14 lines, -11 lines 0 comments Download
M content/browser/download/download_manager_impl.cc View 1 1 chunk +1 line, -1 line 0 comments Download

Depends on Patchset:

Messages

Total messages: 26 (12 generated)
asanka
5 years ago (2015-12-21 21:04:55 UTC) #1
svaldez
https://codereview.chromium.org/1544653002/diff/1/content/browser/download/download_item_impl_unittest.cc File content/browser/download/download_item_impl_unittest.cc (left): https://codereview.chromium.org/1544653002/diff/1/content/browser/download/download_item_impl_unittest.cc#oldcode569 content/browser/download/download_item_impl_unittest.cc:569: ASSERT_EQ(1, observer.interrupt_count()); Shouldn't we keep this line with ASSERT_EQ(0? ...
5 years ago (2015-12-21 21:18:44 UTC) #2
asanka
https://codereview.chromium.org/1544653002/diff/1/content/browser/download/download_item_impl_unittest.cc File content/browser/download/download_item_impl_unittest.cc (left): https://codereview.chromium.org/1544653002/diff/1/content/browser/download/download_item_impl_unittest.cc#oldcode569 content/browser/download/download_item_impl_unittest.cc:569: ASSERT_EQ(1, observer.interrupt_count()); On 2015/12/21 21:18:43, svaldez wrote: > Shouldn't ...
5 years ago (2015-12-21 21:46:11 UTC) #3
svaldez
lgtm https://codereview.chromium.org/1544653002/diff/1/content/browser/download/download_item_impl_unittest.cc File content/browser/download/download_item_impl_unittest.cc (left): https://codereview.chromium.org/1544653002/diff/1/content/browser/download/download_item_impl_unittest.cc#oldcode569 content/browser/download/download_item_impl_unittest.cc:569: ASSERT_EQ(1, observer.interrupt_count()); On 2015/12/21 21:46:10, asanka wrote: > ...
5 years ago (2015-12-21 21:54:01 UTC) #4
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1544653002/20001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1544653002/20001
5 years ago (2015-12-22 01:46:15 UTC) #6
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
5 years ago (2015-12-22 04:21:57 UTC) #8
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1544653002/20001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1544653002/20001
5 years ago (2015-12-22 04:28:30 UTC) #10
commit-bot: I haz the power
Committed patchset #2 (id:20001)
5 years ago (2015-12-22 04:33:15 UTC) #11
commit-bot: I haz the power
Patchset 2 (id:??) landed as https://crrev.com/ad29c15e3115a256cec6ee0ab0ba3138ef087569 Cr-Commit-Position: refs/heads/master@{#366542}
5 years ago (2015-12-22 04:34:12 UTC) #13
Noel Gordon
A revert of this CL (patchset #2 id:20001) has been created in https://codereview.chromium.org/1544743003/ by noel@chromium.org. ...
5 years ago (2015-12-22 09:25:18 UTC) #14
asanka
Let's see if https://codereview.chromium.org/1542063003/ resolved the issue. https://codereview.chromium.org/1549573002/ should make it much more likely that ...
5 years ago (2015-12-22 22:03:06 UTC) #17
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1544653002/40001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1544653002/40001
5 years ago (2015-12-22 22:05:35 UTC) #22
commit-bot: I haz the power
Committed patchset #3 (id:40001)
5 years ago (2015-12-22 23:08:19 UTC) #24
commit-bot: I haz the power
5 years ago (2015-12-22 23:09:27 UTC) #26
Message was sent while issue was closed.
Patchset 3 (id:??) landed as
https://crrev.com/0af68969edff080ce4298756432341b6cd7ddc5d
Cr-Commit-Position: refs/heads/master@{#366681}

Powered by Google App Engine
This is Rietveld 408576698