| 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 | 5 |
| 6 #ifndef CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_MANAGER_IMPL_H_ | 6 #ifndef CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_MANAGER_IMPL_H_ |
| 7 #define CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_MANAGER_IMPL_H_ | 7 #define CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_MANAGER_IMPL_H_ |
| 8 #pragma once | 8 #pragma once |
| 9 | 9 |
| 10 #include <map> | 10 #include <map> |
| (...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 151 | 151 |
| 152 // Retrieves the download from the |download_id|. | 152 // Retrieves the download from the |download_id|. |
| 153 // Returns NULL if the download is not active. | 153 // Returns NULL if the download is not active. |
| 154 virtual content::DownloadItem* GetActiveDownload(int32 download_id) OVERRIDE; | 154 virtual content::DownloadItem* GetActiveDownload(int32 download_id) OVERRIDE; |
| 155 | 155 |
| 156 // Removes |download| from the active and in progress maps. | 156 // Removes |download| from the active and in progress maps. |
| 157 // Called when the download is cancelled or has an error. | 157 // Called when the download is cancelled or has an error. |
| 158 // Does nothing if the download is not in the history DB. | 158 // Does nothing if the download is not in the history DB. |
| 159 void RemoveFromActiveList(content::DownloadItem* download); | 159 void RemoveFromActiveList(content::DownloadItem* download); |
| 160 | 160 |
| 161 // Updates the delegate about the overall download progress. | |
| 162 void UpdateDownloadProgress(); | |
| 163 | |
| 164 // Inform observers that the model has changed. | 161 // Inform observers that the model has changed. |
| 165 void NotifyModelChanged(); | 162 void NotifyModelChanged(); |
| 166 | 163 |
| 167 // Debugging routine to confirm relationship between below | 164 // Debugging routine to confirm relationship between below |
| 168 // containers; no-op if NDEBUG. | 165 // containers; no-op if NDEBUG. |
| 169 void AssertContainersConsistent() const; | 166 void AssertContainersConsistent() const; |
| 170 | 167 |
| 171 // Add a DownloadItem to history_downloads_. | 168 // Add a DownloadItem to history_downloads_. |
| 172 void AddDownloadItemToHistory(content::DownloadItem* item, int64 db_handle); | 169 void AddDownloadItemToHistory(content::DownloadItem* item, int64 db_handle); |
| 173 | 170 |
| (...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 247 content::DownloadManagerDelegate* delegate_; | 244 content::DownloadManagerDelegate* delegate_; |
| 248 | 245 |
| 249 // TODO(rdsmith): Remove when http://crbug.com/85408 is fixed. | 246 // TODO(rdsmith): Remove when http://crbug.com/85408 is fixed. |
| 250 // For debugging only. | 247 // For debugging only. |
| 251 int64 largest_db_handle_in_history_; | 248 int64 largest_db_handle_in_history_; |
| 252 | 249 |
| 253 DISALLOW_COPY_AND_ASSIGN(DownloadManagerImpl); | 250 DISALLOW_COPY_AND_ASSIGN(DownloadManagerImpl); |
| 254 }; | 251 }; |
| 255 | 252 |
| 256 #endif // CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_MANAGER_IMPL_H_ | 253 #endif // CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_MANAGER_IMPL_H_ |
| OLD | NEW |