Index: content/public/browser/download_manager_delegate.h |
diff --git a/content/public/browser/download_manager_delegate.h b/content/public/browser/download_manager_delegate.h |
index 6cc557c6de7a88e5cdbb41f3d5fa28243a551653..0fced8a39da3aee1855406c2348776f0f3dd679e 100644 |
--- a/content/public/browser/download_manager_delegate.h |
+++ b/content/public/browser/download_manager_delegate.h |
@@ -58,13 +58,18 @@ class CONTENT_EXPORT DownloadManagerDelegate { |
virtual bool ShouldOpenFileBasedOnExtension(const FilePath& path); |
// Allows the delegate to override completion of the download. If this |
- // function returns false, the download completion is delayed and the |
- // delegate is responsible for making sure that |
- // DownloadItem::MaybeCompleteDownload is called at some point in the |
- // future. Note that at that point this function will be called again, |
- // and is responsible for returning true when it really is ok for the |
- // download to complete. |
- virtual bool ShouldCompleteDownload(DownloadItem* item); |
+ // function returns false, the download completion is delayed and the delegate |
+ // is responsible for making sure that |complete_callback| is run at some |
+ // point in the future. Note that at that point this function will be called |
+ // again, and is responsible for returning true when it really is ok for the |
+ // download to complete. If this method returns true, then |complete_callback| |
+ // will not be run. It is safe to call this method any number of times both |
+ // before and after |complete_callback| runs; this method will return false |
+ // until the download should complete, then it will run the last |
+ // |complete_callback| passed to it and begin returning true when called. |
Randy Smith (Not in Mondays)
2012/05/03 19:50:47
I'd phrase it somewhat differently. I think what
benjhayden
2012/05/04 17:02:54
Please just give the exact text that you want here
|
+ virtual bool ShouldCompleteDownload( |
+ DownloadItem* item, |
+ const base::Closure& complete_callback); |
// Allows the delegate to override opening the download. If this function |
// returns false, the delegate needs to call |