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

Unified Diff: content/public/browser/download_manager_delegate.h

Issue 10263019: DownloadManagerDelegate::ShouldCompleteDownload(callback) (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: complete_callback is the droids you're looking for. Created 8 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
« no previous file with comments | « content/public/browser/download_item.h ('k') | content/public/browser/download_manager_delegate.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..f491d1e6e346f27aa7772a941d982533b24aea88 100644
--- a/content/public/browser/download_manager_delegate.h
+++ b/content/public/browser/download_manager_delegate.h
@@ -58,13 +58,15 @@ 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.
Randy Smith (Not in Mondays) 2012/05/02 18:14:07 This doesn't spec the behavior if this function is
benjhayden 2012/05/03 19:21:14 PTAL Feel free to suggest alternate text. Also, I
Randy Smith (Not in Mondays) 2012/05/03 19:50:46 I was thinking about asking you to do that, but I
benjhayden 2012/05/04 17:02:54 That's how DM wants to use it now, but that's not
+ 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
« no previous file with comments | « content/public/browser/download_item.h ('k') | content/public/browser/download_manager_delegate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698