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 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
48 const std::vector<GURL>& url_chain, | 48 const std::vector<GURL>& url_chain, |
49 const GURL& referrer_url, | 49 const GURL& referrer_url, |
50 const std::string& mime_type, | 50 const std::string& mime_type, |
51 const std::string& original_mime_type, | 51 const std::string& original_mime_type, |
52 const base::Time& start_time, | 52 const base::Time& start_time, |
53 const base::Time& end_time, | 53 const base::Time& end_time, |
54 const std::string& etag, | 54 const std::string& etag, |
55 const std::string& last_modified, | 55 const std::string& last_modified, |
56 int64_t received_bytes, | 56 int64_t received_bytes, |
57 int64_t total_bytes, | 57 int64_t total_bytes, |
| 58 const std::string& hash, |
58 DownloadItem::DownloadState state, | 59 DownloadItem::DownloadState state, |
59 DownloadDangerType danger_type, | 60 DownloadDangerType danger_type, |
60 DownloadInterruptReason interrupt_reason, | 61 DownloadInterruptReason interrupt_reason, |
61 bool opened, | 62 bool opened, |
62 const net::BoundNetLog& bound_net_log) = 0; | 63 const net::BoundNetLog& bound_net_log) = 0; |
63 | 64 |
64 virtual DownloadItemImpl* CreateActiveItem( | 65 virtual DownloadItemImpl* CreateActiveItem( |
65 DownloadItemImplDelegate* delegate, | 66 DownloadItemImplDelegate* delegate, |
66 uint32_t download_id, | 67 uint32_t download_id, |
67 const DownloadCreateInfo& info, | 68 const DownloadCreateInfo& info, |
68 const net::BoundNetLog& bound_net_log) = 0; | 69 const net::BoundNetLog& bound_net_log) = 0; |
69 | 70 |
70 virtual DownloadItemImpl* CreateSavePageItem( | 71 virtual DownloadItemImpl* CreateSavePageItem( |
71 DownloadItemImplDelegate* delegate, | 72 DownloadItemImplDelegate* delegate, |
72 uint32_t download_id, | 73 uint32_t download_id, |
73 const base::FilePath& path, | 74 const base::FilePath& path, |
74 const GURL& url, | 75 const GURL& url, |
75 const std::string& mime_type, | 76 const std::string& mime_type, |
76 scoped_ptr<DownloadRequestHandleInterface> request_handle, | 77 scoped_ptr<DownloadRequestHandleInterface> request_handle, |
77 const net::BoundNetLog& bound_net_log) = 0; | 78 const net::BoundNetLog& bound_net_log) = 0; |
78 }; | 79 }; |
79 | 80 |
80 } // namespace content | 81 } // namespace content |
81 | 82 |
82 #endif // CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_ITEM_FACTORY_H_ | 83 #endif // CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_ITEM_FACTORY_H_ |
OLD | NEW |