Index: content/public/browser/download_manager.h |
diff --git a/content/public/browser/download_manager.h b/content/public/browser/download_manager.h |
index 12d6fb02b4a121d7ebfae8f2aceca6c00b378279..9c665c7bcc6092921818c94604dac4b191f4b289 100644 |
--- a/content/public/browser/download_manager.h |
+++ b/content/public/browser/download_manager.h |
@@ -62,6 +62,8 @@ class WebContents; |
class CONTENT_EXPORT DownloadManager |
: public base::RefCountedThreadSafe<DownloadManager> { |
public: |
+ typedef base::Callback<void(DownloadId, net::Error)> OnStartedCallback; |
+ |
virtual ~DownloadManager() {} |
static DownloadManager* Create( |
@@ -176,13 +178,16 @@ class CONTENT_EXPORT DownloadManager |
// saved, and whether the user should be prompted about the download. |
// |web_contents| is the web page that the download is done in context of, |
// and must be non-NULL. |
+ // |callback| will be called when the download starts, or if an error |
+ // occurs. |
Randy Smith (Not in Mondays)
2012/03/06 21:29:14
You should specify the calling interface to callba
ahendrickson
2012/03/06 22:01:36
Heh, I added that information to the typedef in th
|
virtual void DownloadUrl(const GURL& url, |
const GURL& referrer, |
const std::string& referrer_encoding, |
bool prefer_cache, |
int64 post_id, |
const DownloadSaveInfo& save_info, |
- content::WebContents* web_contents) = 0; |
+ content::WebContents* web_contents, |
+ const OnStartedCallback& callback) = 0; |
// Allow objects to observe the download creation process. |
virtual void AddObserver(Observer* observer) = 0; |