From db6831ad3a6ba65d881bedd504c92b219c8524da Mon Sep 17 00:00:00 2001 From: "rdsmith@chromium.org" Date: Thu, 9 Jun 2011 21:08:28 +0000 Subject: Change DownloadProcessHandle to be more of an encapsulated class. BUG=None TEST=None Review URL: http://codereview.chromium.org/7112011 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@88585 0039d316-1c4b-4281-b951-d872f2087c98 --- chrome/browser/download/download_file.cc | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) (limited to 'chrome/browser/download/download_file.cc') diff --git a/chrome/browser/download/download_file.cc b/chrome/browser/download/download_file.cc index d1a3470..a64a99f 100644 --- a/chrome/browser/download/download_file.cc +++ b/chrome/browser/download/download_file.cc @@ -21,7 +21,7 @@ DownloadFile::DownloadFile(const DownloadCreateInfo* info, info->received_bytes, info->save_info.file_stream), id_(info->download_id), - process_handle_(info->process_handle), + request_handle_(info->request_handle), download_manager_(download_manager) { DCHECK(BrowserThread::CurrentlyOn(BrowserThread::FILE)); } @@ -30,9 +30,9 @@ DownloadFile::~DownloadFile() { DCHECK(BrowserThread::CurrentlyOn(BrowserThread::FILE)); } -void DownloadFile::CancelDownloadRequest(ResourceDispatcherHost* rdh) { +void DownloadFile::CancelDownloadRequest() { DCHECK(BrowserThread::CurrentlyOn(BrowserThread::FILE)); - download_util::CancelDownloadRequest(rdh, process_handle_); + request_handle_.CancelRequest(); } DownloadManager* DownloadFile::GetDownloadManager() { @@ -43,14 +43,10 @@ DownloadManager* DownloadFile::GetDownloadManager() { std::string DownloadFile::DebugString() const { return base::StringPrintf("{" " id_ = " "%d" - " child_id = " "%d" - " request_id = " "%d" - " render_view_id = " "%d" + " request_handle = %s" " Base File = %s" " }", id_, - process_handle_.child_id(), - process_handle_.request_id(), - process_handle_.render_view_id(), + request_handle_.DebugString().c_str(), BaseFile::DebugString().c_str()); } -- cgit v1.1