Offline page doesn't finish |
|||
Issue descriptionI see this recently. Sometimes download home shows indefinite progress for a offline page even though it has completed (as per notifications) I tracked down this to some observer callbacks in DownloadUIAdapter. The sequence of callbacks as observed are as follows. DownloadUIAdapter::OnAdded DownloadUIAdapter::OfflinePageAdded DownloadUIAdapter::OnChanged DownloadUIAdapter::OnCompleted OnChanged sometimes comes before OfflinePageAdded and sometimes after. The DownloadUIAdapter state is dependent on this order and hence the UI breaks. In the failure case, we change the state from complete to in progress again because the OnChanged callback was delayed. I guess the question is - is this expected in which case we should handle this case in the DownloadUIAdapter or fix it upstream? Steps (not fully repro) 1- open cnn.com. Start downloading. 2- Switch to google.com with some search text. Start downloading. 3- Open download home. You can see both are in progress, even though #2 is done.
,
Sep 28 2017
,
Sep 29 2017
It seems there is also an UI issue. When I am stuck in this state, I can't remove the item.
,
Sep 29 2017
Ah, I see. When we hit the item's X button, it calls CancelDownload -> RequestCoordinator::RemoveRequest(). It is meant to cancel the in-progress download. But since the download has actually completed (and the UI is lying to us), there is nothing to cancel. I think if we fix the observer callback ordering issue above, it should work correctly. CL in progress: https://chromium-review.googlesource.com/c/chromium/src/+/691186
,
Oct 2 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/d99531262bf0b19622e981791ab2d7d0b2511f39 commit d99531262bf0b19622e981791ab2d7d0b2511f39 Author: Shakti Sahu <shaktisahu@chromium.org> Date: Mon Oct 02 20:14:36 2017 Offline pages : Addressed an ordering issue in DownloadUIAdapter The ordering of the observer methods causes a difference to the download homeUI. If not handled correctly, it can cause the offline item to show indefinite progress forever. Bug: 769987 Change-Id: Ia7954848bb7f67207eba0e469baea40fb8b8932d Reviewed-on: https://chromium-review.googlesource.com/691186 Reviewed-by: Filip Gorski <fgorski@chromium.org> Commit-Queue: Shakti Sahu <shaktisahu@chromium.org> Cr-Commit-Position: refs/heads/master@{#505750} [modify] https://crrev.com/d99531262bf0b19622e981791ab2d7d0b2511f39/components/offline_pages/core/downloads/download_ui_adapter.cc [modify] https://crrev.com/d99531262bf0b19622e981791ab2d7d0b2511f39/components/offline_pages/core/downloads/download_ui_adapter_unittest.cc [modify] https://crrev.com/d99531262bf0b19622e981791ab2d7d0b2511f39/components/offline_pages/core/downloads/offline_item_conversions.cc
,
Oct 2 2017
|
|||
►
Sign in to add a comment |
|||
Comment 1 by shaktisahu@chromium.org
, Sep 28 2017