| 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 #ifndef CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_FILE_FACTORY_H_ | 5 #ifndef CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_FILE_FACTORY_H_ |
| 6 #define CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_FILE_FACTORY_H_ | 6 #define CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_FILE_FACTORY_H_ |
| 7 | 7 |
| 8 #include <memory> | 8 #include <memory> |
| 9 #include <vector> |
| 9 | 10 |
| 10 #include "base/files/file.h" | 11 #include "base/files/file.h" |
| 11 #include "base/files/file_path.h" | 12 #include "base/files/file_path.h" |
| 12 #include "base/memory/ref_counted.h" | 13 #include "base/memory/ref_counted.h" |
| 13 #include "base/memory/weak_ptr.h" | 14 #include "base/memory/weak_ptr.h" |
| 14 #include "content/common/content_export.h" | 15 #include "content/common/content_export.h" |
| 16 #include "content/public/browser/download_item.h" |
| 15 #include "url/gurl.h" | 17 #include "url/gurl.h" |
| 16 | 18 |
| 17 namespace net { | 19 namespace net { |
| 18 class NetLogWithSource; | 20 class NetLogWithSource; |
| 19 } | 21 } |
| 20 | 22 |
| 21 namespace content { | 23 namespace content { |
| 22 | 24 |
| 23 class ByteStreamReader; | 25 class ByteStreamReader; |
| 24 class DownloadDestinationObserver; | 26 class DownloadDestinationObserver; |
| 25 class DownloadFile; | 27 class DownloadFile; |
| 26 struct DownloadSaveInfo; | 28 struct DownloadSaveInfo; |
| 27 | 29 |
| 28 class CONTENT_EXPORT DownloadFileFactory { | 30 class CONTENT_EXPORT DownloadFileFactory { |
| 29 public: | 31 public: |
| 30 virtual ~DownloadFileFactory(); | 32 virtual ~DownloadFileFactory(); |
| 31 | 33 |
| 32 virtual DownloadFile* CreateFile( | 34 virtual DownloadFile* CreateFile( |
| 33 std::unique_ptr<DownloadSaveInfo> save_info, | 35 std::unique_ptr<DownloadSaveInfo> save_info, |
| 34 const base::FilePath& default_downloads_directory, | 36 const base::FilePath& default_downloads_directory, |
| 35 std::unique_ptr<ByteStreamReader> byte_stream, | 37 std::unique_ptr<ByteStreamReader> byte_stream, |
| 38 const std::vector<DownloadItem::ReceivedSlice>& received_slices, |
| 36 const net::NetLogWithSource& net_log, | 39 const net::NetLogWithSource& net_log, |
| 37 base::WeakPtr<DownloadDestinationObserver> observer); | 40 base::WeakPtr<DownloadDestinationObserver> observer); |
| 38 }; | 41 }; |
| 39 | 42 |
| 40 } // namespace content | 43 } // namespace content |
| 41 | 44 |
| 42 #endif // CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_FILE_FACTORY_H_ | 45 #endif // CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_FILE_FACTORY_H_ |
| OLD | NEW |