New issue
Advanced search Search tips

Issue 913085 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Dec 11
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux
Pri: 3
Type: Bug



Sign in to add a comment

Clean up Add/Remove observer calls from download controller

Project Member Reported by shaktisahu@chromium.org, Dec 7

Issue description

We currently remove ourselves as the observer of download item if the download is in paused/interrupted states. This causes a lot of confusion and we have to do this for every download observer implementation e.g. DownloadController. This is because download item keeps sending us updates even though the item was paused. We might have a way to clean this up upstream in DownloadItemImpl.
 
Project Member

Comment 1 by bugdroid1@chromium.org, Dec 11

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/d1f09384f3b92ce01f6ed59907bd089310a29aa3

commit d1f09384f3b92ce01f6ed59907bd089310a29aa3
Author: Shakti Sahu <shaktisahu@chromium.org>
Date: Tue Dec 11 01:08:43 2018

Added checks to prune out redundant download updates

Download file keeps sending us updates about its status in a loop even
though the download can be in a paused state. Added a check to prune out
these updates if there is no change to the bytes received. This will
enable us to clean up the code to avoid the state-dependent
AddObserver/RemoveObserver calls in the download observers such as
DownloadController.

Bug:  913085 
Change-Id: I915de9d8f95ba5320529ddfe761404c008678576
Reviewed-on: https://chromium-review.googlesource.com/c/1368650
Reviewed-by: Min Qin <qinmin@chromium.org>
Commit-Queue: Shakti Sahu <shaktisahu@chromium.org>
Cr-Commit-Position: refs/heads/master@{#615361}
[modify] https://crrev.com/d1f09384f3b92ce01f6ed59907bd089310a29aa3/chrome/browser/android/download/download_controller.cc
[modify] https://crrev.com/d1f09384f3b92ce01f6ed59907bd089310a29aa3/components/download/internal/common/download_item_impl.cc

Status: Fixed (was: Started)

Sign in to add a comment