OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "content/browser/download/download_file_factory.h" | 5 #include "content/browser/download/download_file_factory.h" |
6 | 6 |
7 #include <utility> | 7 #include <utility> |
8 | 8 |
9 #include "content/browser/download/download_file_impl.h" | 9 #include "content/browser/download/download_file_impl.h" |
10 | 10 |
11 namespace content { | 11 namespace content { |
12 | 12 |
13 DownloadFileFactory::~DownloadFileFactory() {} | 13 DownloadFileFactory::~DownloadFileFactory() {} |
14 | 14 |
15 DownloadFile* DownloadFileFactory::CreateFile( | 15 DownloadFile* DownloadFileFactory::CreateFile( |
16 scoped_ptr<DownloadSaveInfo> save_info, | 16 const DownloadSaveInfo& save_info, |
17 const base::FilePath& default_downloads_directory, | 17 const base::FilePath& default_downloads_directory, |
18 const GURL& url, | 18 const GURL& url, |
19 const GURL& referrer_url, | 19 const GURL& referrer_url, |
20 bool calculate_hash, | 20 bool calculate_hash, |
21 scoped_ptr<ByteStreamReader> stream, | 21 base::File file, |
| 22 scoped_ptr<ByteStreamReader> byte_stream, |
22 const net::BoundNetLog& bound_net_log, | 23 const net::BoundNetLog& bound_net_log, |
23 base::WeakPtr<DownloadDestinationObserver> observer) { | 24 base::WeakPtr<DownloadDestinationObserver> observer) { |
24 return new DownloadFileImpl(std::move(save_info), default_downloads_directory, | 25 return new DownloadFileImpl(save_info, default_downloads_directory, url, |
25 url, referrer_url, calculate_hash, | 26 referrer_url, calculate_hash, std::move(file), |
26 std::move(stream), bound_net_log, observer); | 27 std::move(byte_stream), bound_net_log, observer); |
27 } | 28 } |
28 | 29 |
29 } // namespace content | 30 } // namespace content |
OLD | NEW |