Download extension API onChanged event delta contains some download item fields (which are constant for that item) such as mime, url, finalUrl, startTime which are sent only in very specific circumstances. This makes them unreliable and confusing to use.
The data will be present only in two specific cases:
1. There wasn't any onCreated/onChanged event listener registered when download item was created. This is because extension api data representation of this download item was not created in such case. Note that it is only necessary to have any extension listening to onChanged or onCreated event to populate extension api download item data, so any extension that registers to download events after download item creation in such case will not receive that extra download delta data.
2. Dangerous download is accepted by user. In such case there is no onCreated event fired when such download is created and all the download item data is populated and sent in onChanged event when user accepts the download.
This bug is reported as a result of discussion in https://codereview.chromium.org/1706193002/.
Comment 1 by asanka@chromium.org
, Jul 8 2016Labels: OS-All
Status: Available (was: Untriaged)
Summary: chrome.download extension API onChanged event data inconsistencies. (was: Extension download api onChanged event data inconsistencies.)