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

Unified Diff: chrome/browser/download/chrome_download_manager_delegate.cc

Issue 10263019: DownloadManagerDelegate::ShouldCompleteDownload(callback) (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: 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
Index: chrome/browser/download/chrome_download_manager_delegate.cc
diff --git a/chrome/browser/download/chrome_download_manager_delegate.cc b/chrome/browser/download/chrome_download_manager_delegate.cc
index e069eddcbe8445310dd4b054cd0f2370aa27cdcd..c9da57959ebaf84150446ca620b77cc5f783cee3 100644
--- a/chrome/browser/download/chrome_download_manager_delegate.cc
+++ b/chrome/browser/download/chrome_download_manager_delegate.cc
@@ -154,11 +154,11 @@ void ChromeDownloadManagerDelegate::ChooseDownloadPath(
int32 download_id) {
// Deletes itself.
#if defined(OS_CHROMEOS)
- new DownloadFilePickerChromeOS(
+ new DownloadFilePickerChromeOS
#else
- new DownloadFilePicker(
+ new DownloadFilePicker
#endif
- download_manager_, web_contents, suggested_path, download_id);
+ (download_manager_, web_contents, suggested_path, download_id);
}
FilePath ChromeDownloadManagerDelegate::GetIntermediatePath(
@@ -193,7 +193,9 @@ bool ChromeDownloadManagerDelegate::ShouldOpenFileBasedOnExtension(
return download_prefs_->IsAutoOpenEnabledForExtension(extension);
}
-bool ChromeDownloadManagerDelegate::ShouldCompleteDownload(DownloadItem* item) {
+bool ChromeDownloadManagerDelegate::ShouldCompleteDownload(
+ DownloadItem* item,
+ const base::Closure& maybe_complete_download) {
#if defined(ENABLE_SAFE_BROWSING)
// See if there is already a pending SafeBrowsing check for that download.
SafeBrowsingState* state = static_cast<SafeBrowsingState*>(
@@ -223,7 +225,8 @@ bool ChromeDownloadManagerDelegate::ShouldCompleteDownload(DownloadItem* item) {
#if defined(OS_CHROMEOS)
// If there's a GData upload associated with this download, we wait until that
// is complete before allowing the download item to complete.
- if (!gdata::GDataDownloadObserver::IsReadyToComplete(item))
+ if (!gdata::GDataDownloadObserver::IsReadyToComplete(
+ item, maybe_complete_download))
return false;
#endif
return true;

Powered by Google App Engine
This is Rietveld 408576698