| Index: content/browser/download/download_manager_impl.cc
|
| ===================================================================
|
| --- content/browser/download/download_manager_impl.cc (revision 121040)
|
| +++ content/browser/download/download_manager_impl.cc (working copy)
|
| @@ -450,6 +450,7 @@
|
| << " download = " << download->DebugString(true);
|
|
|
| in_progress_[download_id] = download;
|
| + UpdateDownloadProgress(); // Reflect entry into in_progress_.
|
|
|
| // Rename to intermediate name.
|
| FilePath download_path;
|
| @@ -496,6 +497,7 @@
|
| DownloadItem* download = it->second;
|
| if (download->IsInProgress()) {
|
| download->UpdateProgress(bytes_so_far, bytes_per_sec, hash_state);
|
| + UpdateDownloadProgress(); // Reflect size updates.
|
| delegate_->UpdateItemInPersistentStore(download);
|
| }
|
| }
|
| @@ -609,6 +611,7 @@
|
|
|
| // Remove the id from in_progress
|
| in_progress_.erase(download->GetId());
|
| + UpdateDownloadProgress(); // Reflect removal from in_progress_.
|
|
|
| delegate_->UpdateItemInPersistentStore(download);
|
|
|
| @@ -725,6 +728,7 @@
|
| if (download->GetDbHandle() != DownloadItem::kUninitializedHandle) {
|
| in_progress_.erase(download->GetId());
|
| active_downloads_.erase(download->GetId());
|
| + UpdateDownloadProgress(); // Reflect removal from in_progress_.
|
| delegate_->UpdateItemInPersistentStore(download);
|
| }
|
| }
|
| @@ -742,6 +746,10 @@
|
| delegate_ = delegate;
|
| }
|
|
|
| +void DownloadManagerImpl::UpdateDownloadProgress() {
|
| + delegate_->DownloadProgressUpdated();
|
| +}
|
| +
|
| int DownloadManagerImpl::RemoveDownloadItems(
|
| const DownloadVector& pending_deletes) {
|
| if (pending_deletes.empty())
|
|
|