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

Unified Diff: content/public/browser/download_manager.h

Issue 10232010: DownloadUrlParameters (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: fixes 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
« no previous file with comments | « content/content_browser.gypi ('k') | content/public/browser/download_url_parameters.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/public/browser/download_manager.h
diff --git a/content/public/browser/download_manager.h b/content/public/browser/download_manager.h
index d67a385a4141f8f2e691a78154debff61ae81479..355ea0dbdf81a6d71fe76a3c8bd2e23cedfe2836 100644
--- a/content/public/browser/download_manager.h
+++ b/content/public/browser/download_manager.h
@@ -37,12 +37,12 @@
#include "base/gtest_prod_util.h"
#include "base/message_loop_helpers.h"
#include "base/time.h"
+#include "content/public/browser/browser_thread.h"
#include "content/public/browser/download_id.h"
#include "content/public/browser/download_interrupt_reasons.h"
#include "content/public/browser/download_item.h"
-#include "content/public/browser/browser_thread.h"
-#include "net/base/net_log.h"
#include "net/base/net_errors.h"
+#include "net/base/net_log.h"
class DownloadRequestHandle;
class GURL;
@@ -50,19 +50,16 @@ struct DownloadCreateInfo;
struct DownloadRetrieveInfo;
namespace content {
+
class BrowserContext;
class DownloadManagerDelegate;
class DownloadQuery;
-class WebContents;
-struct DownloadSaveInfo;
+class DownloadUrlParameters;
// Browser's download manager: manages all downloads and destination view.
class CONTENT_EXPORT DownloadManager
: public base::RefCountedThreadSafe<DownloadManager> {
public:
- // NOTE: If there is an error, the DownloadId will be invalid.
- typedef base::Callback<void(DownloadId, net::Error)> OnStartedCallback;
-
virtual ~DownloadManager() {}
static DownloadManager* Create(
@@ -172,26 +169,8 @@ class CONTENT_EXPORT DownloadManager
// deleted is returned back to the caller.
virtual int RemoveAllDownloads() = 0;
- // Downloads the content at |url|. |referrer| and |referrer_encoding| are the
- // referrer for the download, and may be empty. If |prefer_cache| is true,
- // then if the response to |url| is in the HTTP cache it will be used without
- // revalidation. If |post_id| is non-negative, then it identifies the post
- // transaction used to originally retrieve the |url| resource - it also
- // requires |prefer_cache| to be |true| since re-post'ing is not done.
- // |save_info| specifies where the downloaded file should be
- // 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 that prevents a download item from being created.
- virtual void DownloadUrl(const GURL& url,
- const GURL& referrer,
- const std::string& referrer_encoding,
- bool prefer_cache,
- int64 post_id,
- const DownloadSaveInfo& save_info,
- WebContents* web_contents,
- const OnStartedCallback& callback) = 0;
+ // See DownloadUrlParameters for details about controlling the download.
+ virtual void DownloadUrl(scoped_ptr<DownloadUrlParameters> parameters) = 0;
// Allow objects to observe the download creation process.
virtual void AddObserver(Observer* observer) = 0;
« no previous file with comments | « content/content_browser.gypi ('k') | content/public/browser/download_url_parameters.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698