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