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_MANAGER_IMPL_H_ | 5 #ifndef CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_MANAGER_IMPL_H_ |
6 #define CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_MANAGER_IMPL_H_ | 6 #define CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_MANAGER_IMPL_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 #include <set> | 9 #include <set> |
10 | 10 |
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
101 // For testing. | 101 // For testing. |
102 friend class DownloadManagerTest; | 102 friend class DownloadManagerTest; |
103 friend class DownloadTest; | 103 friend class DownloadTest; |
104 | 104 |
105 friend class base::RefCountedThreadSafe<DownloadManagerImpl>; | 105 friend class base::RefCountedThreadSafe<DownloadManagerImpl>; |
106 | 106 |
107 virtual ~DownloadManagerImpl(); | 107 virtual ~DownloadManagerImpl(); |
108 | 108 |
109 // Create a new active item based on the info. Separate from | 109 // Create a new active item based on the info. Separate from |
110 // StartDownload() for testing. | 110 // StartDownload() for testing. |
111 void CreateActiveItem(DownloadId id, const DownloadCreateInfo& info); | 111 DownloadItemImpl* CreateActiveItem(DownloadId id, |
| 112 const DownloadCreateInfo& info); |
112 | 113 |
113 // Get next download id. | 114 // Get next download id. |
114 DownloadId GetNextId(); | 115 DownloadId GetNextId(); |
115 | 116 |
116 // Called with the result of DownloadManagerDelegate::CheckForFileExistence. | 117 // Called with the result of DownloadManagerDelegate::CheckForFileExistence. |
117 // Updates the state of the file and then notifies this update to the file's | 118 // Updates the state of the file and then notifies this update to the file's |
118 // observer. | 119 // observer. |
119 void OnFileExistenceChecked(int32 download_id, bool result); | 120 void OnFileExistenceChecked(int32 download_id, bool result); |
120 | 121 |
121 // Overridden from DownloadItemImplDelegate | 122 // Overridden from DownloadItemImplDelegate |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
164 DownloadManagerDelegate* delegate_; | 165 DownloadManagerDelegate* delegate_; |
165 | 166 |
166 net::NetLog* net_log_; | 167 net::NetLog* net_log_; |
167 | 168 |
168 DISALLOW_COPY_AND_ASSIGN(DownloadManagerImpl); | 169 DISALLOW_COPY_AND_ASSIGN(DownloadManagerImpl); |
169 }; | 170 }; |
170 | 171 |
171 } // namespace content | 172 } // namespace content |
172 | 173 |
173 #endif // CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_MANAGER_IMPL_H_ | 174 #endif // CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_MANAGER_IMPL_H_ |
OLD | NEW |