| 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 // The DownloadItemFactory is used to produce different DownloadItems. | 5 // The DownloadItemFactory is used to produce different DownloadItems. |
| 6 // It is separate from the DownloadManager to allow download manager | 6 // It is separate from the DownloadManager to allow download manager |
| 7 // unit tests to control the items produced. | 7 // unit tests to control the items produced. |
| 8 | 8 |
| 9 #ifndef CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_ITEM_FACTORY_H_ | 9 #ifndef CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_ITEM_FACTORY_H_ |
| 10 #define CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_ITEM_FACTORY_H_ | 10 #define CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_ITEM_FACTORY_H_ |
| (...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 56 const base::Time& end_time, | 56 const base::Time& end_time, |
| 57 const std::string& etag, | 57 const std::string& etag, |
| 58 const std::string& last_modified, | 58 const std::string& last_modified, |
| 59 int64_t received_bytes, | 59 int64_t received_bytes, |
| 60 int64_t total_bytes, | 60 int64_t total_bytes, |
| 61 const std::string& hash, | 61 const std::string& hash, |
| 62 DownloadItem::DownloadState state, | 62 DownloadItem::DownloadState state, |
| 63 DownloadDangerType danger_type, | 63 DownloadDangerType danger_type, |
| 64 DownloadInterruptReason interrupt_reason, | 64 DownloadInterruptReason interrupt_reason, |
| 65 bool opened, | 65 bool opened, |
| 66 const base::Time& last_access_time, |
| 66 const net::NetLogWithSource& net_log) = 0; | 67 const net::NetLogWithSource& net_log) = 0; |
| 67 | 68 |
| 68 virtual DownloadItemImpl* CreateActiveItem( | 69 virtual DownloadItemImpl* CreateActiveItem( |
| 69 DownloadItemImplDelegate* delegate, | 70 DownloadItemImplDelegate* delegate, |
| 70 uint32_t download_id, | 71 uint32_t download_id, |
| 71 const DownloadCreateInfo& info, | 72 const DownloadCreateInfo& info, |
| 72 const net::NetLogWithSource& net_log) = 0; | 73 const net::NetLogWithSource& net_log) = 0; |
| 73 | 74 |
| 74 virtual DownloadItemImpl* CreateSavePageItem( | 75 virtual DownloadItemImpl* CreateSavePageItem( |
| 75 DownloadItemImplDelegate* delegate, | 76 DownloadItemImplDelegate* delegate, |
| 76 uint32_t download_id, | 77 uint32_t download_id, |
| 77 const base::FilePath& path, | 78 const base::FilePath& path, |
| 78 const GURL& url, | 79 const GURL& url, |
| 79 const std::string& mime_type, | 80 const std::string& mime_type, |
| 80 std::unique_ptr<DownloadRequestHandleInterface> request_handle, | 81 std::unique_ptr<DownloadRequestHandleInterface> request_handle, |
| 81 const net::NetLogWithSource& net_log) = 0; | 82 const net::NetLogWithSource& net_log) = 0; |
| 82 }; | 83 }; |
| 83 | 84 |
| 84 } // namespace content | 85 } // namespace content |
| 85 | 86 |
| 86 #endif // CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_ITEM_FACTORY_H_ | 87 #endif // CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_ITEM_FACTORY_H_ |
| OLD | NEW |