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_ |
11 #pragma once | 11 #pragma once |
12 | 12 |
| 13 #include <string> |
| 14 |
| 15 #include "base/memory/scoped_ptr.h" |
13 #include "content/browser/download/download_item_impl.h" | 16 #include "content/browser/download/download_item_impl.h" |
14 | 17 |
15 #include <string> | |
16 | |
17 struct DownloadCreateInfo; | 18 struct DownloadCreateInfo; |
18 class DownloadRequestHandleInterface; | 19 class DownloadRequestHandleInterface; |
19 class FilePath; | 20 class FilePath; |
20 class GURL; | 21 class GURL; |
21 | 22 |
22 namespace content { | 23 namespace content { |
23 class DownloadId; | 24 class DownloadId; |
24 class DownloadItem; | 25 class DownloadItem; |
25 struct DownloadPersistentStoreInfo; | 26 struct DownloadPersistentStoreInfo; |
26 } | 27 } |
(...skipping 10 matching lines...) Expand all Loading... |
37 | 38 |
38 virtual content::DownloadItem* CreatePersistedItem( | 39 virtual content::DownloadItem* CreatePersistedItem( |
39 DownloadItemImpl::Delegate* delegate, | 40 DownloadItemImpl::Delegate* delegate, |
40 content::DownloadId download_id, | 41 content::DownloadId download_id, |
41 const content::DownloadPersistentStoreInfo& info, | 42 const content::DownloadPersistentStoreInfo& info, |
42 const net::BoundNetLog& bound_net_log) = 0; | 43 const net::BoundNetLog& bound_net_log) = 0; |
43 | 44 |
44 virtual content::DownloadItem* CreateActiveItem( | 45 virtual content::DownloadItem* CreateActiveItem( |
45 DownloadItemImpl::Delegate* delegate, | 46 DownloadItemImpl::Delegate* delegate, |
46 const DownloadCreateInfo& info, | 47 const DownloadCreateInfo& info, |
47 DownloadRequestHandleInterface* request_handle, | 48 scoped_ptr<DownloadRequestHandleInterface> request_handle, |
48 bool is_otr, | 49 bool is_otr, |
49 const net::BoundNetLog& bound_net_log) = 0; | 50 const net::BoundNetLog& bound_net_log) = 0; |
50 | 51 |
51 virtual content::DownloadItem* CreateSavePageItem( | 52 virtual content::DownloadItem* CreateSavePageItem( |
52 DownloadItemImpl::Delegate* delegate, | 53 DownloadItemImpl::Delegate* delegate, |
53 const FilePath& path, | 54 const FilePath& path, |
54 const GURL& url, | 55 const GURL& url, |
55 bool is_otr, | 56 bool is_otr, |
56 content::DownloadId download_id, | 57 content::DownloadId download_id, |
57 const std::string& mime_type, | 58 const std::string& mime_type, |
58 const net::BoundNetLog& bound_net_log) = 0; | 59 const net::BoundNetLog& bound_net_log) = 0; |
59 }; | 60 }; |
60 | 61 |
61 } // namespace content | 62 } // namespace content |
62 | 63 |
63 #endif // CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_ITEM_FACTORY_H_ | 64 #endif // CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_ITEM_FACTORY_H_ |
OLD | NEW |