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

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: merge Created 8 years, 7 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
« no previous file with comments | « chrome/chrome_browser.gypi ('k') | content/browser/download/download_manager_impl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 0bdd238e0e34b41e8d2a3951bc5df9e241d9747b..1bcdcd43490117b36c119b764de75d0601d34743 100644
--- a/content/browser/download/download_item_impl.h
+++ b/content/browser/download/download_item_impl.h
@@ -129,7 +129,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;
@@ -225,6 +224,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|.
« no previous file with comments | « chrome/chrome_browser.gypi ('k') | content/browser/download/download_manager_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698