| Index: chrome/browser/download/download_file.cc
|
| diff --git a/chrome/browser/download/download_file.cc b/chrome/browser/download/download_file.cc
|
| index c877a6e5fe0b37feb0468ed0450f73cb527eab4e..ab563802f26d0c9bd4a327f24b9ab6abdc5b8044 100644
|
| --- a/chrome/browser/download/download_file.cc
|
| +++ b/chrome/browser/download/download_file.cc
|
| @@ -10,15 +10,19 @@
|
| #include "chrome/browser/download/download_util.h"
|
| #include "chrome/browser/history/download_types.h"
|
|
|
| -DownloadFile::DownloadFile(const DownloadCreateInfo* info)
|
| +DownloadFile::DownloadFile(const DownloadCreateInfo* info,
|
| + DownloadManager* download_manager)
|
| : BaseFile(info->save_info.file_path,
|
| info->url,
|
| info->referrer_url,
|
| + info->received_bytes,
|
| info->save_info.file_stream),
|
| id_(info->download_id),
|
| child_id_(info->child_id),
|
| - request_id_(info->request_id) {
|
| + request_id_(info->request_id),
|
| + download_manager_(download_manager) {
|
| DCHECK(ChromeThread::CurrentlyOn(ChromeThread::FILE));
|
| +
|
| }
|
|
|
| DownloadFile::~DownloadFile() {
|
| @@ -40,3 +44,13 @@ void DownloadFile::CancelDownloadRequest(ResourceDispatcherHost* rdh) {
|
| child_id_,
|
| request_id_));
|
| }
|
| +
|
| +void DownloadFile::OnDownloadManagerShutdown() {
|
| + DCHECK(ChromeThread::CurrentlyOn(ChromeThread::FILE));
|
| + download_manager_ = NULL;
|
| +}
|
| +
|
| +DownloadManager* DownloadFile::GetDownloadManager() {
|
| + DCHECK(ChromeThread::CurrentlyOn(ChromeThread::FILE));
|
| + return download_manager_.get();
|
| +}
|
|
|