| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 DownloadManager object manages the process of downloading, including | 5 // The DownloadManager object manages the process of downloading, including |
| 6 // updates to the history system and providing the information for displaying | 6 // updates to the history system and providing the information for displaying |
| 7 // the downloads view in the Destinations tab. There is one DownloadManager per | 7 // the downloads view in the Destinations tab. There is one DownloadManager per |
| 8 // active browser context in Chrome. | 8 // active browser context in Chrome. |
| 9 // | 9 // |
| 10 // Download observers: | 10 // Download observers: |
| (...skipping 234 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 245 | 245 |
| 246 FilePath last_download_path() { return last_download_path_; } | 246 FilePath last_download_path() { return last_download_path_; } |
| 247 | 247 |
| 248 // Creates the download item. Must be called on the UI thread. | 248 // Creates the download item. Must be called on the UI thread. |
| 249 void CreateDownloadItem(DownloadCreateInfo* info); | 249 void CreateDownloadItem(DownloadCreateInfo* info); |
| 250 | 250 |
| 251 // Clears the last download path, used to initialize "save as" dialogs. | 251 // Clears the last download path, used to initialize "save as" dialogs. |
| 252 void ClearLastDownloadPath(); | 252 void ClearLastDownloadPath(); |
| 253 | 253 |
| 254 // Overridden from DownloadStatusUpdaterDelegate: | 254 // Overridden from DownloadStatusUpdaterDelegate: |
| 255 virtual bool IsDownloadProgressKnown(); | 255 virtual bool IsDownloadProgressKnown() const OVERRIDE; |
| 256 virtual int64 GetInProgressDownloadCount(); | 256 virtual int64 GetInProgressDownloadCount() const OVERRIDE; |
| 257 virtual int64 GetReceivedDownloadBytes(); | 257 virtual int64 GetReceivedDownloadBytes() const OVERRIDE; |
| 258 virtual int64 GetTotalDownloadBytes(); | 258 virtual int64 GetTotalDownloadBytes() const OVERRIDE; |
| 259 | 259 |
| 260 // Called by the delegate after the save as dialog is closed. | 260 // Called by the delegate after the save as dialog is closed. |
| 261 void FileSelected(const FilePath& path, void* params); | 261 void FileSelected(const FilePath& path, void* params); |
| 262 void FileSelectionCanceled(void* params); | 262 void FileSelectionCanceled(void* params); |
| 263 | 263 |
| 264 // Called by the delegate if it delayed the download in | 264 // Called by the delegate if it delayed the download in |
| 265 // DownloadManagerDelegate::ShouldStartDownload and now is ready. | 265 // DownloadManagerDelegate::ShouldStartDownload and now is ready. |
| 266 void RestartDownload(int32 download_id); | 266 void RestartDownload(int32 download_id); |
| 267 | 267 |
| 268 // Mark the download opened in the persistent store. | 268 // Mark the download opened in the persistent store. |
| (...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 434 content::DownloadManagerDelegate* delegate_; | 434 content::DownloadManagerDelegate* delegate_; |
| 435 | 435 |
| 436 // TODO(rdsmith): Remove when http://crbug.com/85408 is fixed. | 436 // TODO(rdsmith): Remove when http://crbug.com/85408 is fixed. |
| 437 // For debugging only. | 437 // For debugging only. |
| 438 int64 largest_db_handle_in_history_; | 438 int64 largest_db_handle_in_history_; |
| 439 | 439 |
| 440 DISALLOW_COPY_AND_ASSIGN(DownloadManager); | 440 DISALLOW_COPY_AND_ASSIGN(DownloadManager); |
| 441 }; | 441 }; |
| 442 | 442 |
| 443 #endif // CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_MANAGER_H_ | 443 #endif // CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_MANAGER_H_ |
| OLD | NEW |