Chromium Code Reviews| Index: content/browser/download/download_file_manager.cc |
| diff --git a/content/browser/download/download_file_manager.cc b/content/browser/download/download_file_manager.cc |
| index 7bebd92ef3970f5544759752c5048d4642fe2bef..2c65db806afa3822b8407a32f7aa36558fa99e11 100644 |
| --- a/content/browser/download/download_file_manager.cc |
| +++ b/content/browser/download/download_file_manager.cc |
| @@ -31,43 +31,10 @@ using content::DownloadFile; |
| using content::DownloadId; |
| using content::DownloadManager; |
| -namespace { |
| - |
| -class DownloadFileFactoryImpl |
| - : public DownloadFileManager::DownloadFileFactory { |
| - public: |
| - DownloadFileFactoryImpl() {} |
| - |
| - virtual content::DownloadFile* CreateFile( |
| - DownloadCreateInfo* info, |
| - scoped_ptr<content::ByteStreamReader> stream, |
| - DownloadManager* download_manager, |
| - bool calculate_hash, |
| - const net::BoundNetLog& bound_net_log) OVERRIDE; |
| -}; |
| - |
| -DownloadFile* DownloadFileFactoryImpl::CreateFile( |
| - DownloadCreateInfo* info, |
| - scoped_ptr<content::ByteStreamReader> stream, |
| - DownloadManager* download_manager, |
| - bool calculate_hash, |
| - const net::BoundNetLog& bound_net_log) { |
| - return new DownloadFileImpl( |
| - info, stream.Pass(), new DownloadRequestHandle(info->request_handle), |
| - download_manager, calculate_hash, |
| - scoped_ptr<content::PowerSaveBlocker>( |
| - new content::PowerSaveBlocker( |
| - content::PowerSaveBlocker::kPowerSaveBlockPreventAppSuspension, |
| - "Download in progress")).Pass(), |
| - bound_net_log); |
| -} |
| - |
| -} // namespace |
| - |
| -DownloadFileManager::DownloadFileManager(DownloadFileFactory* factory) |
| +DownloadFileManager::DownloadFileManager(content::DownloadFileFactory* factory) |
| : download_file_factory_(factory) { |
| if (download_file_factory_ == NULL) |
| - download_file_factory_.reset(new DownloadFileFactoryImpl); |
| + download_file_factory_.reset(new content::DownloadFileFactory); |
| } |
| DownloadFileManager::~DownloadFileManager() { |
| @@ -155,12 +122,9 @@ void DownloadFileManager::CompleteDownload( |
| // Other platforms don't currently do source annotation. |
| download_file->AnnotateWithSourceInformation(); |
|
asanka
2012/09/20 18:42:15
DownloadFileImpl::Detach() also does this.
Randy Smith (Not in Mondays)
2012/09/21 21:58:01
Ooops; thanks. Deleted.
|
| - download_file->Detach(); |
| + download_file->Detach(callback); |
| EraseDownload(global_id); |
| - |
| - // Notify our caller we've let it go. |
| - BrowserThread::PostTask(BrowserThread::UI, FROM_HERE, callback); |
| } |
| void DownloadFileManager::OnDownloadManagerShutdown(DownloadManager* manager) { |