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 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
99 typedef std::vector<DownloadItemImpl*> DownloadItemImplVector; | 99 typedef std::vector<DownloadItemImpl*> DownloadItemImplVector; |
100 | 100 |
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 | |
110 // StartDownload() for testing. | |
111 void CreateActiveItem(DownloadId id, const DownloadCreateInfo& info); | |
112 | |
113 // Get next download id. | 109 // Get next download id. |
114 DownloadId GetNextId(); | 110 DownloadId GetNextId(); |
115 | 111 |
116 // Called with the result of DownloadManagerDelegate::CheckForFileExistence. | 112 // Called with the result of DownloadManagerDelegate::CheckForFileExistence. |
117 // Updates the state of the file and then notifies this update to the file's | 113 // Updates the state of the file and then notifies this update to the file's |
118 // observer. | 114 // observer. |
119 void OnFileExistenceChecked(int32 download_id, bool result); | 115 void OnFileExistenceChecked(int32 download_id, bool result); |
120 | 116 |
121 // Overridden from DownloadItemImplDelegate | 117 // Overridden from DownloadItemImplDelegate |
122 // (Note that |GetBrowserContext| are present in both interfaces.) | 118 // (Note that |GetBrowserContext| are present in both interfaces.) |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
164 DownloadManagerDelegate* delegate_; | 160 DownloadManagerDelegate* delegate_; |
165 | 161 |
166 net::NetLog* net_log_; | 162 net::NetLog* net_log_; |
167 | 163 |
168 DISALLOW_COPY_AND_ASSIGN(DownloadManagerImpl); | 164 DISALLOW_COPY_AND_ASSIGN(DownloadManagerImpl); |
169 }; | 165 }; |
170 | 166 |
171 } // namespace content | 167 } // namespace content |
172 | 168 |
173 #endif // CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_MANAGER_IMPL_H_ | 169 #endif // CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_MANAGER_IMPL_H_ |
OLD | NEW |