Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(4164)

Unified Diff: chrome/browser/download/download_file.cc

Issue 6932046: Added DownloadProcessHandle class. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Added comments. Created 9 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/download/download_file.h ('k') | chrome/browser/download/download_file_manager.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/download/download_file.cc
diff --git a/chrome/browser/download/download_file.cc b/chrome/browser/download/download_file.cc
index 629ee117a95e44d2008f1fc727b722d965f4cffb..264bae3eb524028907e692a772e125e4e5e86a7b 100644
--- a/chrome/browser/download/download_file.cc
+++ b/chrome/browser/download/download_file.cc
@@ -21,11 +21,9 @@ DownloadFile::DownloadFile(const DownloadCreateInfo* info,
info->received_bytes,
info->save_info.file_stream),
id_(info->download_id),
- child_id_(info->child_id),
- request_id_(info->request_id),
+ process_handle_(info->process_handle),
download_manager_(download_manager) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::FILE));
-
}
DownloadFile::~DownloadFile() {
@@ -34,12 +32,7 @@ DownloadFile::~DownloadFile() {
void DownloadFile::CancelDownloadRequest(ResourceDispatcherHost* rdh) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::FILE));
- BrowserThread::PostTask(
- BrowserThread::IO, FROM_HERE,
- NewRunnableFunction(&download_util::CancelDownloadRequest,
- rdh,
- child_id_,
- request_id_));
+ download_util::CancelDownloadRequest(rdh, process_handle_);
}
DownloadManager* DownloadFile::GetDownloadManager() {
@@ -49,15 +42,15 @@ DownloadManager* DownloadFile::GetDownloadManager() {
std::string DownloadFile::DebugString() const {
return base::StringPrintf("{"
- " full_path_ = " "\"%s\""
" id_ = " "%d"
- " child_id_ = " "%d"
- " request_id_ = " "%d"
+ " child_id = " "%d"
+ " request_id = " "%d"
+ " render_view_id = " "%d"
" Base File = %s"
" }",
- full_path_.value().c_str(),
id_,
- child_id_,
- request_id_,
+ process_handle_.child_id(),
+ process_handle_.request_id(),
+ process_handle_.render_view_id(),
BaseFile::DebugString().c_str());
}
« no previous file with comments | « chrome/browser/download/download_file.h ('k') | chrome/browser/download/download_file_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698