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

Unified Diff: chrome/browser/download/download_manager.h

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_item.cc ('k') | chrome/browser/download/download_manager.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/download/download_manager.h
diff --git a/chrome/browser/download/download_manager.h b/chrome/browser/download/download_manager.h
index 5af89325f605feb330aa78c1a5b241a2793540cb..a533570c497dceb7a5872d1bef72fbc64f8ab3ed 100644
--- a/chrome/browser/download/download_manager.h
+++ b/chrome/browser/download/download_manager.h
@@ -42,6 +42,7 @@
#include "base/scoped_ptr.h"
#include "base/time.h"
#include "chrome/browser/download/download_status_updater_delegate.h"
+#include "chrome/browser/download/download_process_handle.h"
#include "chrome/browser/ui/shell_dialogs.h"
#include "content/browser/browser_thread.h"
@@ -198,7 +199,7 @@ class DownloadManager
DownloadCreateInfo info, int64 db_handle);
// Display a new download in the appropriate browser UI.
- void ShowDownloadInBrowser(const DownloadCreateInfo& info,
+ void ShowDownloadInBrowser(DownloadProcessHandle* process_handle,
DownloadItem* download);
// The number of in progress (including paused) downloads.
@@ -289,9 +290,10 @@ class DownloadManager
void AttachDownloadItem(DownloadCreateInfo* info);
// Download cancel helper function.
+ // |process_handle| is passed by value because it is ultimately passed to
+ // other threads, and this way we don't have to worry about object lifetimes.
void DownloadCancelledInternal(int download_id,
- int render_process_id,
- int request_id);
+ DownloadProcessHandle process_handle);
// All data has been downloaded.
// |hash| is sha256 hash for the downloaded file. It is empty when the hash
@@ -306,9 +308,10 @@ class DownloadManager
// Makes the ResourceDispatcherHost pause/un-pause a download request.
// Called on the IO thread.
+ // |process_handle| is passed by value because this is called from other
+ // threads, and this way we don't have to worry about object lifetimes.
void PauseDownloadRequest(ResourceDispatcherHost* rdh,
- int render_process_id,
- int request_id,
+ DownloadProcessHandle process_handle,
bool pause);
// Inform observers that the model has changed.
« no previous file with comments | « chrome/browser/download/download_item.cc ('k') | chrome/browser/download/download_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698