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

Unified Diff: content/browser/download/drag_download_file.cc

Issue 10232010: DownloadUrlParameters (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/drag_download_file.cc
diff --git a/content/browser/download/drag_download_file.cc b/content/browser/download/drag_download_file.cc
index cb9a2fd65ba1d9becf0d85a9323518a91289d28d..b79e71f086b92cac328b9c4201a8797af1cc132f 100644
--- a/content/browser/download/drag_download_file.cc
+++ b/content/browser/download/drag_download_file.cc
@@ -13,11 +13,13 @@
#include "content/public/browser/browser_thread.h"
#include "content/public/browser/download_item.h"
#include "content/public/browser/download_save_info.h"
+#include "content/public/browser/download_url_parameters.h"
#include "net/base/file_stream.h"
using content::BrowserThread;
using content::DownloadItem;
using content::DownloadManager;
+using content::DownloadUrlParameters;
using content::WebContents;
DragDownloadFile::DragDownloadFile(
@@ -135,14 +137,11 @@ void DragDownloadFile::InitiateDownload() {
download_stats::RecordDownloadSource(
download_stats::INITIATED_BY_DRAG_N_DROP);
- download_manager_->DownloadUrl(url_,
- referrer_,
- referrer_encoding_,
- false,
- -1,
- save_info,
- web_contents_,
- DownloadManager::OnStartedCallback());
+ DownloadUrlParameters* params = DownloadUrlParameters::FromWebContents(
+ web_contents_, url_, save_info);
+ params->set_referrer(referrer_);
+ params->set_referrer_encoding(referrer_encoding_);
+ download_manager_->DownloadUrl(params);
}
void DragDownloadFile::DownloadCompleted(bool is_successful) {

Powered by Google App Engine
This is Rietveld 408576698