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

Unified Diff: content/browser/download/download_item_impl.h

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: content/browser/download/download_item_impl.h
diff --git a/content/browser/download/download_item_impl.h b/content/browser/download/download_item_impl.h
index e3e3299866bfd26e50ffea773d640b48fb29d0ea..99803390c3df09ab3805ba9db36641843df01b0e 100644
--- a/content/browser/download/download_item_impl.h
+++ b/content/browser/download/download_item_impl.h
@@ -128,7 +128,6 @@ class CONTENT_EXPORT DownloadItemImpl : public content::DownloadItem {
virtual void OnAllDataSaved(
int64 size, const std::string& final_hash) OVERRIDE;
virtual void OnDownloadedFileRemoved() OVERRIDE;
- virtual void MaybeCompleteDownload() OVERRIDE;
virtual void Interrupted(int64 size,
const std::string& hash_state,
content::DownloadInterruptReason reason) OVERRIDE;
@@ -224,6 +223,11 @@ class CONTENT_EXPORT DownloadItemImpl : public content::DownloadItem {
// hash state.
void UpdateProgress(int64 bytes_so_far, const std::string& hash_state);
+ // If all pre-requisites have been met, complete download processing, i.e. do
+ // internal cleanup, file rename, and potentially auto-open. (Dangerous
+ // downloads still may block on user acceptance after this point.)
+ void MaybeCompleteDownload();
+
// Internal helper for maintaining consistent received and total sizes, and
// setting the final hash.
// Should only be called from |OnAllDataSaved|.

Powered by Google App Engine
This is Rietveld 408576698