| Index: content/browser/download/download_manager_impl.cc
|
| diff --git a/content/browser/download/download_manager_impl.cc b/content/browser/download/download_manager_impl.cc
|
| index ed129591a729f9e8ff5d927dbff039869a55e283..7492e21b2091e5d5e35b9844b5d5177635b5f90b 100644
|
| --- a/content/browser/download/download_manager_impl.cc
|
| +++ b/content/browser/download/download_manager_impl.cc
|
| @@ -293,8 +293,7 @@ void DownloadManagerImpl::OnFileRemovalDetected(int64 db_handle) {
|
| }
|
| }
|
|
|
| -void DownloadManagerImpl::RestartDownload(
|
| - int32 download_id) {
|
| +void DownloadManagerImpl::RestartDownload(int32 download_id) {
|
| DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
|
|
|
| DownloadItem* download = GetActiveDownloadItem(download_id);
|
| @@ -421,14 +420,16 @@ void DownloadManagerImpl::ContinueDownloadWithPath(
|
| delegate_->AddItemToPersistentStore(download);
|
| }
|
|
|
| -void DownloadManagerImpl::UpdateDownload(int32 download_id, int64 bytes_so_far,
|
| - int64 bytes_per_sec) {
|
| +void DownloadManagerImpl::UpdateDownload(int32 download_id,
|
| + int64 bytes_so_far,
|
| + int64 bytes_per_sec,
|
| + std::string hash_state) {
|
| 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->UpdateProgress(bytes_so_far, bytes_per_sec);
|
| + download->UpdateProgress(bytes_so_far, bytes_per_sec, hash_state);
|
| UpdateDownloadProgress(); // Reflect size updates.
|
| delegate_->UpdateItemInPersistentStore(download);
|
| }
|
| @@ -621,6 +622,7 @@ void DownloadManagerImpl::DownloadCancelled(DownloadItem* download) {
|
|
|
| void DownloadManagerImpl::OnDownloadInterrupted(int32 download_id,
|
| int64 size,
|
| + std::string hash_state,
|
| InterruptReason reason) {
|
| DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
|
|
|
| @@ -635,7 +637,7 @@ void DownloadManagerImpl::OnDownloadInterrupted(int32 download_id,
|
| << " download = " << download->DebugString(true);
|
|
|
| RemoveFromActiveList(download);
|
| - download->Interrupted(size, reason);
|
| + download->Interrupted(size, hash_state, reason);
|
| download->OffThreadCancel(file_manager_);
|
| }
|
|
|
| @@ -768,6 +770,7 @@ void DownloadManagerImpl::DownloadUrlToFile(const GURL& url,
|
| DCHECK(tab_contents);
|
| ResourceDispatcherHost* resource_dispatcher_host =
|
| content::GetContentClient()->browser()->GetResourceDispatcherHost();
|
| +
|
| // We send a pointer to content::ResourceContext, instead of the usual
|
| // reference, so that a copy of the object isn't made.
|
| // base::Bind can't handle 7 args, so we use URLParams and RenderParams.
|
|
|