| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 profile in Chrome. | 8 // active profile in Chrome. |
| 9 // | 9 // |
| 10 // Download observers: | 10 // Download observers: |
| (...skipping 314 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 325 // map. When the download is complete, it is removed from | 325 // map. When the download is complete, it is removed from |
| 326 // |in_progress_|. Downloads from past sessions read from a | 326 // |in_progress_|. Downloads from past sessions read from a |
| 327 // persisted state from the history system are placed directly into | 327 // persisted state from the history system are placed directly into |
| 328 // |history_downloads_| since they have valid handles in the history system. | 328 // |history_downloads_| since they have valid handles in the history system. |
| 329 typedef std::set<DownloadItem*> DownloadSet; | 329 typedef std::set<DownloadItem*> DownloadSet; |
| 330 typedef base::hash_map<int64, DownloadItem*> DownloadMap; | 330 typedef base::hash_map<int64, DownloadItem*> DownloadMap; |
| 331 | 331 |
| 332 DownloadSet downloads_; | 332 DownloadSet downloads_; |
| 333 DownloadMap history_downloads_; | 333 DownloadMap history_downloads_; |
| 334 DownloadMap in_progress_; | 334 DownloadMap in_progress_; |
| 335 DownloadMap active_downloads_; |
| 335 #if !defined(NDEBUG) | 336 #if !defined(NDEBUG) |
| 336 DownloadSet save_page_as_downloads_; | 337 DownloadSet save_page_as_downloads_; |
| 337 #endif | 338 #endif |
| 338 | 339 |
| 339 // True if the download manager has been initialized and requires a shutdown. | 340 // True if the download manager has been initialized and requires a shutdown. |
| 340 bool shutdown_needed_; | 341 bool shutdown_needed_; |
| 341 | 342 |
| 342 // Observers that want to be notified of changes to the set of downloads. | 343 // Observers that want to be notified of changes to the set of downloads. |
| 343 ObserverList<Observer> observers_; | 344 ObserverList<Observer> observers_; |
| 344 | 345 |
| (...skipping 26 matching lines...) Expand all Loading... |
| 371 // The "Save As" dialog box used to ask the user where a file should be | 372 // The "Save As" dialog box used to ask the user where a file should be |
| 372 // saved. | 373 // saved. |
| 373 scoped_refptr<SelectFileDialog> select_file_dialog_; | 374 scoped_refptr<SelectFileDialog> select_file_dialog_; |
| 374 | 375 |
| 375 scoped_ptr<OtherDownloadManagerObserver> other_download_manager_observer_; | 376 scoped_ptr<OtherDownloadManagerObserver> other_download_manager_observer_; |
| 376 | 377 |
| 377 DISALLOW_COPY_AND_ASSIGN(DownloadManager); | 378 DISALLOW_COPY_AND_ASSIGN(DownloadManager); |
| 378 }; | 379 }; |
| 379 | 380 |
| 380 #endif // CHROME_BROWSER_DOWNLOAD_DOWNLOAD_MANAGER_H_ | 381 #endif // CHROME_BROWSER_DOWNLOAD_DOWNLOAD_MANAGER_H_ |
| OLD | NEW |