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

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

Issue 6932046: Added DownloadProcessHandle class. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Removed code extraneous to this CL. Created 9 years, 8 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
Index: chrome/browser/download/download_item.h
diff --git a/chrome/browser/download/download_item.h b/chrome/browser/download/download_item.h
index 8afd2d2f62c8bc00d36d34ffefd35fbb2dd2c22f..dce525f44e2ebc1efc7d79d617c3cce99963303a 100644
--- a/chrome/browser/download/download_item.h
+++ b/chrome/browser/download/download_item.h
@@ -25,6 +25,7 @@
#include "base/observer_list.h"
#include "base/time.h"
#include "base/timer.h"
+#include "chrome/browser/download/download_process_handle.h"
#include "googleurl/src/gurl.h"
class DownloadFileManager;
@@ -260,8 +261,8 @@ class DownloadItem {
bool is_paused() const { return is_paused_; }
bool open_when_complete() const { return open_when_complete_; }
void set_open_when_complete(bool open) { open_when_complete_ = open; }
- int render_process_id() const { return render_process_id_; }
- int request_id() const { return request_id_; }
+ int render_process_id() const { return process_handle_.child_id(); }
+ int request_id() const { return process_handle_.request_id(); }
Randy Smith (Not in Mondays) 2011/05/05 20:25:34 Are these two still needed, or can we get rid of t
ahendrickson 2011/05/06 16:16:50 At the moment they are, but I can change DownloadM
SafetyState safety_state() const { return safety_state_; }
void set_safety_state(SafetyState safety_state) {
safety_state_ = safety_state;
@@ -277,6 +278,10 @@ class DownloadItem {
void set_opened(bool opened) { opened_ = opened; }
bool opened() const { return opened_; }
+ const DownloadProcessHandle& process_handle() const {
+ return process_handle_;
+ }
+
// Returns the final target file path for the download.
FilePath GetTargetFilePath() const;
@@ -338,6 +343,7 @@ class DownloadItem {
// Current received bytes
int64 received_bytes_;
+ DownloadProcessHandle process_handle_;
Randy Smith (Not in Mondays) 2011/05/05 20:25:34 This looks strange without having a comment descri
ahendrickson 2011/05/06 16:16:50 Done.
// Last error.
int last_os_error_;
@@ -386,10 +392,6 @@ class DownloadItem {
// This stores their final target name.
FilePath target_name_;
- // For canceling or pausing requests.
- int render_process_id_;
- int request_id_;
-
// True if the item was downloaded as a result of 'save as...'
bool save_as_;

Powered by Google App Engine
This is Rietveld 408576698