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

Unified Diff: chrome/browser/download/chrome_download_manager_delegate.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
Index: chrome/browser/download/chrome_download_manager_delegate.h
diff --git a/chrome/browser/download/chrome_download_manager_delegate.h b/chrome/browser/download/chrome_download_manager_delegate.h
index 21cc3406b9f5c0279d4ce07044aa0994399eb308..8ec3d34f48434c65bbf292e938e6d50d94eeff48 100644
--- a/chrome/browser/download/chrome_download_manager_delegate.h
+++ b/chrome/browser/download/chrome_download_manager_delegate.h
@@ -65,7 +65,9 @@ class ChromeDownloadManagerDelegate
virtual content::WebContents*
GetAlternativeWebContentsToNotifyForDownload() OVERRIDE;
virtual bool ShouldOpenFileBasedOnExtension(const FilePath& path) OVERRIDE;
- virtual bool ShouldCompleteDownload(content::DownloadItem* item) OVERRIDE;
+ virtual bool ShouldCompleteDownload(
+ content::DownloadItem* item,
+ const base::Closure& complete_callback) OVERRIDE;
virtual bool ShouldOpenDownload(content::DownloadItem* item) OVERRIDE;
virtual bool GenerateFileHash() OVERRIDE;
virtual void AddItemToPersistentStore(content::DownloadItem* item) OVERRIDE;
@@ -157,6 +159,14 @@ class ChromeDownloadManagerDelegate
// Open the given item with a web intent dispatch.
void OpenWithWebIntent(const content::DownloadItem* item);
+ // Internal gateways for ShouldCompleteDownload().
+ bool IsDownloadReadyForCompletion(
+ content::DownloadItem* item,
+ const base::Closure& internal_complete_callback);
+ void ShouldCompleteDownloadInternal(
+ int download_id,
+ const base::Closure& user_complete_callback);
+
Profile* profile_;
int next_download_id_;
scoped_ptr<DownloadPrefs> download_prefs_;
« no previous file with comments | « chrome/browser/chromeos/gdata/gdata_download_observer.cc ('k') | chrome/browser/download/chrome_download_manager_delegate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698