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 "base/files/file.h" | 8 #include "base/files/file.h" |
9 #include "base/files/file_path.h" | 9 #include "base/files/file_path.h" |
10 #include "base/memory/ref_counted.h" | 10 #include "base/memory/ref_counted.h" |
11 #include "base/memory/scoped_ptr.h" | 11 #include "base/memory/scoped_ptr.h" |
12 #include "base/memory/weak_ptr.h" | 12 #include "base/memory/weak_ptr.h" |
13 #include "content/common/content_export.h" | 13 #include "content/common/content_export.h" |
14 #include "url/gurl.h" | 14 #include "url/gurl.h" |
15 | 15 |
| 16 namespace crypto { |
| 17 class SecureHash; |
| 18 } |
| 19 |
16 namespace net { | 20 namespace net { |
17 class BoundNetLog; | 21 class BoundNetLog; |
18 } | 22 } |
19 | 23 |
20 namespace content { | 24 namespace content { |
21 | 25 |
22 class ByteStreamReader; | 26 class ByteStreamReader; |
23 class DownloadDestinationObserver; | 27 class DownloadDestinationObserver; |
24 class DownloadFile; | 28 class DownloadFile; |
25 class DownloadManager; | 29 class DownloadManager; |
26 struct DownloadSaveInfo; | 30 struct DownloadSaveInfo; |
27 | 31 |
28 class CONTENT_EXPORT DownloadFileFactory { | 32 class CONTENT_EXPORT DownloadFileFactory { |
29 public: | 33 public: |
30 virtual ~DownloadFileFactory(); | 34 virtual ~DownloadFileFactory(); |
31 | 35 |
32 virtual DownloadFile* CreateFile( | 36 virtual DownloadFile* CreateFile( |
33 const DownloadSaveInfo& save_info, | 37 scoped_ptr<DownloadSaveInfo> save_info, |
34 const base::FilePath& default_downloads_directory, | 38 const base::FilePath& default_downloads_directory, |
35 const GURL& url, | |
36 const GURL& referrer_url, | |
37 bool calculate_hash, | |
38 base::File file, | |
39 scoped_ptr<ByteStreamReader> byte_stream, | 39 scoped_ptr<ByteStreamReader> byte_stream, |
40 const net::BoundNetLog& bound_net_log, | 40 const net::BoundNetLog& bound_net_log, |
41 base::WeakPtr<DownloadDestinationObserver> observer); | 41 base::WeakPtr<DownloadDestinationObserver> observer); |
42 }; | 42 }; |
43 | 43 |
44 } // namespace content | 44 } // namespace content |
45 | 45 |
46 #endif // CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_FILE_FACTORY_H_ | 46 #endif // CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_FILE_FACTORY_H_ |
OLD | NEW |