| Index: content/browser/download/download_manager.cc
|
| diff --git a/content/browser/download/download_manager.cc b/content/browser/download/download_manager.cc
|
| index e80113ea221fcba9c8c09a0a3c58343002f517d6..29ef7d3b851048c408d15183c5a71e6e76f0f620 100644
|
| --- a/content/browser/download/download_manager.cc
|
| +++ b/content/browser/download/download_manager.cc
|
| @@ -281,8 +281,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);
|
| @@ -367,13 +366,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);
|
| }
|
| @@ -563,6 +563,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));
|
|
|
| @@ -577,7 +578,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_);
|
| }
|
|
|
|
|