Chromium Code Reviews| 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(); } |
|
Paweł Hajdan Jr.
2011/05/05 20:13:51
Just wondering, can we remove those accessors comp
ahendrickson
2011/05/06 16:16:50
Done.
|
| + int request_id() const { return process_handle_.request_id(); } |
| 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_; |
|
Paweł Hajdan Jr.
2011/05/05 20:13:51
nit: There should be an empty line above an a comm
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_; |