Chromium Code Reviews| Index: components/offline_pages/downloads/download_notifying_observer.cc |
| diff --git a/components/offline_pages/downloads/download_notifying_observer.cc b/components/offline_pages/downloads/download_notifying_observer.cc |
| index 397bcc975a867fbd9fff675cb620921857ca9662..3fc561dab9dc772717db1663b6d8cdb7fe017bf6 100644 |
| --- a/components/offline_pages/downloads/download_notifying_observer.cc |
| +++ b/components/offline_pages/downloads/download_notifying_observer.cc |
| @@ -44,10 +44,8 @@ void DownloadNotifyingObserver::CreateAndStartObserving( |
| } |
| void DownloadNotifyingObserver::OnAdded(const SavePageRequest& request) { |
| - DCHECK(notifier_.get()); |
| - if (!IsVisibleInUI(request.client_id())) |
| - return; |
| - notifier_->NotifyDownloadProgress(DownloadUIItem(request)); |
| + // Same notifier update as for OnChanged. |
| + OnChanged(request); |
|
dougarnett
2016/11/28 21:33:26
Hmm, actually this didn't work. Seems that we need
dougarnett
2016/11/28 22:18:49
Here is one approach at this level to affect the c
|
| } |
| void DownloadNotifyingObserver::OnChanged(const SavePageRequest& request) { |
| @@ -56,6 +54,8 @@ void DownloadNotifyingObserver::OnChanged(const SavePageRequest& request) { |
| return; |
| if (request.request_state() == SavePageRequest::RequestState::PAUSED) |
| notifier_->NotifyDownloadPaused(DownloadUIItem(request)); |
| + else if (request.request_state() == SavePageRequest::RequestState::AVAILABLE) |
| + notifier_->NotifyDownloadInterrupted(DownloadUIItem(request)); |
| else |
| notifier_->NotifyDownloadProgress(DownloadUIItem(request)); |
| } |