Chromium Code Reviews| Index: content/public/browser/download_item.h |
| diff --git a/content/public/browser/download_item.h b/content/public/browser/download_item.h |
| index cce08280a5858cbe14887b906028cb90b73f3668..73e8dd558fb894a100222f3b762e0bea0c6e2a42 100644 |
| --- a/content/public/browser/download_item.h |
| +++ b/content/public/browser/download_item.h |
| @@ -115,12 +115,16 @@ class CONTENT_EXPORT DownloadItem : public base::SupportsUserData { |
| // Called when the user has validated the download of a dangerous file. |
| virtual void ValidateDangerousDownload() = 0; |
| - // Called to acquire a dangerous download and remove the DownloadItem from |
| - // views and history. |callback| will be invoked on the UI thread with the |
| - // path to the downloaded file. The caller is responsible for cleanup. |
| + // Called to acquire a dangerous download. If |delete_file_afterward| is true, |
| + // |callback| will be invoked on the UI thread with the path to the downloaded |
| + // file, and the DownloadItem will be removed from views and history if |
| + // appropriate. Otherwise, make a temp copy of the download file, and invoke |
| + // |callback| with the path to the temp copy. The caller is responsible for |
| + // cleanup. |
|
asanka
2016/11/07 16:01:55
Nit: I suggest changing 'X will be <verb>d' to '<v
Jialiu Lin
2016/11/14 20:57:39
Done.
|
| // Note: It is important for |callback| to be valid since the downloaded file |
| // will not be cleaned up if the callback fails. |
| - virtual void StealDangerousDownload(const AcquireFileCallback& callback) = 0; |
| + virtual void StealDangerousDownload(bool delete_file_afterward, |
| + const AcquireFileCallback& callback) = 0; |
| // Pause a download. Will have no effect if the download is already |
| // paused. |