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