Re-subimission of https://codereview.chromium.org/1041213003/
[chromium-blink-merge.git] / content / browser / download / download_file_factory.cc
blob817bee111807f01bfd7adfdefcd6c8f3bf6e1bdc
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
3 // found in the LICENSE file.
5 #include "content/browser/download/download_file_factory.h"
7 #include "content/browser/download/download_file_impl.h"
9 namespace content {
11 DownloadFileFactory::~DownloadFileFactory() {}
13 DownloadFile* DownloadFileFactory::CreateFile(
14 scoped_ptr<DownloadSaveInfo> save_info,
15 const base::FilePath& default_downloads_directory,
16 const GURL& url,
17 const GURL& referrer_url,
18 bool calculate_hash,
19 scoped_ptr<ByteStreamReader> stream,
20 const net::BoundNetLog& bound_net_log,
21 base::WeakPtr<DownloadDestinationObserver> observer) {
22 return new DownloadFileImpl(
23 save_info.Pass(), default_downloads_directory, url, referrer_url,
24 calculate_hash, stream.Pass(), bound_net_log, observer);
27 } // namespace content