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 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
44 const base::Time& end_time, | 44 const base::Time& end_time, |
45 int64 received_bytes, | 45 int64 received_bytes, |
46 int64 total_bytes, | 46 int64 total_bytes, |
47 content::DownloadItem::DownloadState state, | 47 content::DownloadItem::DownloadState state, |
48 bool opened, | 48 bool opened, |
49 const net::BoundNetLog& bound_net_log) = 0; | 49 const net::BoundNetLog& bound_net_log) = 0; |
50 | 50 |
51 virtual DownloadItemImpl* CreateActiveItem( | 51 virtual DownloadItemImpl* CreateActiveItem( |
52 DownloadItemImplDelegate* delegate, | 52 DownloadItemImplDelegate* delegate, |
53 const DownloadCreateInfo& info, | 53 const DownloadCreateInfo& info, |
54 scoped_ptr<DownloadRequestHandleInterface> request_handle, | |
55 const net::BoundNetLog& bound_net_log) = 0; | 54 const net::BoundNetLog& bound_net_log) = 0; |
56 | 55 |
57 virtual DownloadItemImpl* CreateSavePageItem( | 56 virtual DownloadItemImpl* CreateSavePageItem( |
58 DownloadItemImplDelegate* delegate, | 57 DownloadItemImplDelegate* delegate, |
59 const FilePath& path, | 58 const FilePath& path, |
60 const GURL& url, | 59 const GURL& url, |
61 DownloadId download_id, | 60 DownloadId download_id, |
62 const std::string& mime_type, | 61 const std::string& mime_type, |
63 const net::BoundNetLog& bound_net_log) = 0; | 62 const net::BoundNetLog& bound_net_log) = 0; |
64 }; | 63 }; |
65 | 64 |
66 } // namespace content | 65 } // namespace content |
67 | 66 |
68 #endif // CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_ITEM_FACTORY_H_ | 67 #endif // CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_ITEM_FACTORY_H_ |
OLD | NEW |