summaryrefslogtreecommitdiff
path: root/content/browser/download/drag_download_file.cc
diff options
context:
space:
mode:
authorBen Murdoch <benm@google.com>2014-04-10 11:22:14 +0100
committerBen Murdoch <benm@google.com>2014-04-10 11:22:14 +0100
commitc5cede9ae108bb15f6b7a8aea21c7e1fefa2834c (patch)
treee9edd581ad60ab80aa5ab423a2a80df652a75792 /content/browser/download/drag_download_file.cc
parent54cd42278ccf1d52996034848086a09b23065a40 (diff)
downloadchromium_org-c5cede9ae108bb15f6b7a8aea21c7e1fefa2834c.tar.gz
Merge from Chromium at DEPS revision 262940
This commit was generated by merge_to_master.py. Change-Id: I9a3fddbb29857fa8f68a18c6a0115862b65f84d1
Diffstat (limited to 'content/browser/download/drag_download_file.cc')
-rw-r--r--content/browser/download/drag_download_file.cc12
1 files changed, 6 insertions, 6 deletions
diff --git a/content/browser/download/drag_download_file.cc b/content/browser/download/drag_download_file.cc
index c98282e769..29b8b5caa5 100644
--- a/content/browser/download/drag_download_file.cc
+++ b/content/browser/download/drag_download_file.cc
@@ -5,6 +5,7 @@
#include "content/browser/download/drag_download_file.h"
#include "base/bind.h"
+#include "base/files/file.h"
#include "base/message_loop/message_loop.h"
#include "content/browser/download/download_stats.h"
#include "content/browser/web_contents/web_contents_impl.h"
@@ -13,7 +14,6 @@
#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"
namespace content {
@@ -53,7 +53,7 @@ class DragDownloadFile::DragDownloadFileUI : public DownloadItem::Observer {
// Do not call weak_ptr_factory_.GetWeakPtr() outside the UI thread.
}
- void InitiateDownload(scoped_ptr<net::FileStream> file_stream,
+ void InitiateDownload(base::File file,
const base::FilePath& file_path) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
DownloadManager* download_manager =
@@ -67,7 +67,7 @@ class DragDownloadFile::DragDownloadFileUI : public DownloadItem::Observer {
params->set_callback(base::Bind(&DragDownloadFileUI::OnDownloadStarted,
weak_ptr_factory_.GetWeakPtr()));
params->set_file_path(file_path);
- params->set_file_stream(file_stream.Pass()); // Nulls file_stream.
+ params->set_file(file.Pass()); // Nulls file.
download_manager->DownloadUrl(params.Pass());
}
@@ -150,13 +150,13 @@ class DragDownloadFile::DragDownloadFileUI : public DownloadItem::Observer {
};
DragDownloadFile::DragDownloadFile(const base::FilePath& file_path,
- scoped_ptr<net::FileStream> file_stream,
+ base::File file,
const GURL& url,
const Referrer& referrer,
const std::string& referrer_encoding,
WebContents* web_contents)
: file_path_(file_path),
- file_stream_(file_stream.Pass()),
+ file_(file.Pass()),
drag_message_loop_(base::MessageLoop::current()),
state_(INITIALIZED),
drag_ui_(NULL),
@@ -197,7 +197,7 @@ void DragDownloadFile::Start(ui::DownloadFileObserver* observer) {
BrowserThread::PostTask(BrowserThread::UI, FROM_HERE, base::Bind(
&DragDownloadFileUI::InitiateDownload, base::Unretained(drag_ui_),
- base::Passed(&file_stream_), file_path_));
+ base::Passed(&file_), file_path_));
}
bool DragDownloadFile::Wait() {