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

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: Merged to TOT. 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 5cdf0065083262566f8ca7e91ae9278dbcc77af0..b45ac95db6e2ed7c8246f7ae38cdf0b682b975a9 100644
--- a/content/browser/download/download_manager.cc
+++ b/content/browser/download/download_manager.cc
@@ -483,6 +483,10 @@ void DownloadManager::MaybeCompleteDownload(DownloadItem* download) {
DCHECK(download->db_handle() != DownloadItem::kUninitializedHandle);
DCHECK_EQ(1u, history_downloads_.count(download->db_handle()));
+ // Give the delegate a chance to override.
+ if (!delegate_->ShouldCompleteDownload(download))
+ return;
+
VLOG(20) << __FUNCTION__ << "()" << " executing: download = "
<< download->DebugString(false);
« 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