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

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

Issue 8414007: Rearrange Should*Download delegate calls to be more useful and intuitive. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Tweaked comment. Created 9 years, 2 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.cc
diff --git a/content/browser/download/download_manager.cc b/content/browser/download/download_manager.cc
index 7797935e7e4e0f5ba5679c69e8e69860bb23292c..18dfca2abfe2d03a583ad803d55667a3993fecd2 100644
--- a/content/browser/download/download_manager.cc
+++ b/content/browser/download/download_manager.cc
@@ -497,6 +497,10 @@ void DownloadManager::MaybeCompleteDownload(DownloadItem* download) {
VLOG(20) << __FUNCTION__ << "()" << " executing: download = "
<< download->DebugString(false);
asanka 2011/10/28 19:22:19 Very minor nit: Should this logging happen after c
Randy Smith (Not in Mondays) 2011/10/29 23:10:39 Yeah, I think so. Done.
+ // Give the delegate a chance to override.
+ if (!delegate_->ShouldCompleteDownload(download))
+ return;
+
// Remove the id from in_progress
in_progress_.erase(download->id());
UpdateDownloadProgress(); // Reflect removal from in_progress_.
« no previous file with comments | « content/browser/download/download_item.cc ('k') | content/browser/download/mock_download_manager_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698