Index: chrome/browser/download/download_manager.cc |
diff --git a/chrome/browser/download/download_manager.cc b/chrome/browser/download/download_manager.cc |
index 58090f2d492e18f00c5dc16dca08589f9e43e6e1..46c6073cdd4b20e4afaacfa7fc636d3021000fd2 100644 |
--- a/chrome/browser/download/download_manager.cc |
+++ b/chrome/browser/download/download_manager.cc |
@@ -755,9 +755,7 @@ void DownloadManager::DownloadCancelled(int32 download_id) { |
void DownloadManager::DownloadCancelledInternal( |
int download_id, DownloadProcessHandle process_handle) { |
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); |
- // Cancel the network request. RDH is guaranteed to outlive the IO thread. |
hendrickson_a
2011/06/04 16:01:45
I'd like this comment to be preserved (in download
Randy Smith (Not in Mondays)
2011/06/07 22:41:11
Done.
|
- download_util::CancelDownloadRequest( |
- g_browser_process->resource_dispatcher_host(), process_handle); |
+ process_handle.CancelRequest(); |
BrowserThread::PostTask( |
BrowserThread::FILE, FROM_HERE, |
@@ -801,38 +799,11 @@ void DownloadManager::OnDownloadError(int32 download_id, |
file_manager_, &DownloadFileManager::CancelDownload, download_id)); |
} |
-void DownloadManager::PauseDownload(int32 download_id, bool pause) { |
- DownloadMap::iterator it = in_progress_.find(download_id); |
- if (it == in_progress_.end()) |
- return; |
- |
- DownloadItem* download = it->second; |
- if (pause == download->is_paused()) |
- return; |
- |
- BrowserThread::PostTask( |
- BrowserThread::IO, FROM_HERE, |
- NewRunnableMethod(this, |
- &DownloadManager::PauseDownloadRequest, |
- g_browser_process->resource_dispatcher_host(), |
- download->process_handle(), |
- pause)); |
-} |
- |
void DownloadManager::UpdateAppIcon() { |
if (status_updater_) |
status_updater_->Update(); |
} |
-void DownloadManager::PauseDownloadRequest(ResourceDispatcherHost* rdh, |
- DownloadProcessHandle process_handle, |
- bool pause) { |
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); |
- rdh->PauseRequest(process_handle.child_id(), |
- process_handle.request_id(), |
- pause); |
-} |
- |
void DownloadManager::RemoveDownload(int64 download_handle) { |
DownloadMap::iterator it = history_downloads_.find(download_handle); |
if (it == history_downloads_.end()) |