| Index: content/browser/download/download_manager.cc
|
| diff --git a/content/browser/download/download_manager.cc b/content/browser/download/download_manager.cc
|
| index 890c9bc65c03aa361b3f18f770e408cec6abf0ff..38800f339c2760421e38550c249fa7b7df47d055 100644
|
| --- a/content/browser/download/download_manager.cc
|
| +++ b/content/browser/download/download_manager.cc
|
| @@ -291,8 +291,7 @@ void DownloadManager::OnFileRemovalDetected(int64 db_handle) {
|
| }
|
| }
|
|
|
| -void DownloadManager::RestartDownload(
|
| - int32 download_id) {
|
| +void DownloadManager::RestartDownload(int32 download_id) {
|
| DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
|
|
|
| DownloadItem* download = GetActiveDownloadItem(download_id);
|
| @@ -380,13 +379,14 @@ void DownloadManager::ContinueDownloadWithPath(DownloadItem* download,
|
| delegate_->AddItemToPersistentStore(download);
|
| }
|
|
|
| -void DownloadManager::UpdateDownload(int32 download_id, int64 size) {
|
| +void DownloadManager::UpdateDownload(int32 download_id, int64 size,
|
| + const std::string& partial_hash) {
|
| DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
|
| DownloadMap::iterator it = active_downloads_.find(download_id);
|
| if (it != active_downloads_.end()) {
|
| DownloadItem* download = it->second;
|
| if (download->IsInProgress()) {
|
| - download->Update(size);
|
| + download->Update(size, partial_hash);
|
| UpdateDownloadProgress(); // Reflect size updates.
|
| delegate_->UpdateItemInPersistentStore(download);
|
| }
|
| @@ -407,7 +407,7 @@ void DownloadManager::OnResponseCompleted(int32 download_id,
|
| return;
|
|
|
| DownloadItem* download = active_downloads_[download_id];
|
| - download->OnAllDataSaved(size);
|
| + download->OnAllDataSaved(size, hash);
|
|
|
| delegate_->OnResponseCompleted(download, hash);
|
|
|
| @@ -572,6 +572,7 @@ void DownloadManager::DownloadCancelledInternal(DownloadItem* download) {
|
|
|
| void DownloadManager::OnDownloadInterrupted(int32 download_id,
|
| int64 size,
|
| + const std::string partial_hash,
|
| InterruptReason reason) {
|
| DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
|
|
|
| @@ -586,7 +587,7 @@ void DownloadManager::OnDownloadInterrupted(int32 download_id,
|
| << " download = " << download->DebugString(true);
|
|
|
| RemoveFromActiveList(download);
|
| - download->Interrupted(size, reason);
|
| + download->Interrupted(size, partial_hash, reason);
|
| download->OffThreadCancel(file_manager_);
|
| }
|
|
|
|
|