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

Unified Diff: content/browser/download/download_manager_impl.cc

Issue 11740026: Pull delegate check back into IsDownloadReadyForCompletion so that if (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixed test. Created 7 years, 12 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: content/browser/download/download_manager_impl.cc
diff --git a/content/browser/download/download_manager_impl.cc b/content/browser/download/download_manager_impl.cc
index 83c68747c42c06bcfbefc09d5d22680b45ebfcb6..15ff84a7500ddfb76dbebeb9061d29dbb0a05019 100644
--- a/content/browser/download/download_manager_impl.cc
+++ b/content/browser/download/download_manager_impl.cc
@@ -237,14 +237,15 @@ void DownloadManagerImpl::DetermineDownloadTarget(
}
}
-void DownloadManagerImpl::ReadyForDownloadCompletion(
+bool DownloadManagerImpl::ShouldCompleteDownload(
DownloadItemImpl* item, const base::Closure& complete_callback) {
if (!delegate_ ||
delegate_->ShouldCompleteDownload(item, complete_callback)) {
- complete_callback.Run();
+ return true;
}
// Otherwise, the delegate has accepted responsibility to run the
// callback when the download is ready for completion.
+ return false;
}
bool DownloadManagerImpl::ShouldOpenFileBasedOnExtension(const FilePath& path) {
« no previous file with comments | « content/browser/download/download_manager_impl.h ('k') | content/public/browser/download_manager_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698