| OLD | NEW |
| 1 // Copyright (c) 2006-2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2009 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 // Each download is represented by a DownloadItem, and all DownloadItems | 10 // Each download is represented by a DownloadItem, and all DownloadItems |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 52 #include "chrome/browser/cancelable_request.h" | 52 #include "chrome/browser/cancelable_request.h" |
| 53 #include "chrome/browser/history/download_types.h" | 53 #include "chrome/browser/history/download_types.h" |
| 54 #include "chrome/browser/history/history.h" | 54 #include "chrome/browser/history/history.h" |
| 55 #include "chrome/browser/shell_dialogs.h" | 55 #include "chrome/browser/shell_dialogs.h" |
| 56 #include "chrome/common/pref_member.h" | 56 #include "chrome/common/pref_member.h" |
| 57 | 57 |
| 58 class DownloadFileManager; | 58 class DownloadFileManager; |
| 59 class DownloadItemView; | 59 class DownloadItemView; |
| 60 class DownloadManager; | 60 class DownloadManager; |
| 61 class GURL; | 61 class GURL; |
| 62 class MessageLoop; | |
| 63 class PrefService; | 62 class PrefService; |
| 64 class Profile; | 63 class Profile; |
| 65 class ResourceDispatcherHost; | 64 class ResourceDispatcherHost; |
| 66 class URLRequestContextGetter; | 65 class URLRequestContextGetter; |
| 67 class TabContents; | 66 class TabContents; |
| 68 | 67 |
| 69 namespace base { | 68 namespace base { |
| 70 class Thread; | 69 class Thread; |
| 71 } | 70 } |
| 72 | 71 |
| (...skipping 512 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 585 // The current active profile. | 584 // The current active profile. |
| 586 Profile* profile_; | 585 Profile* profile_; |
| 587 scoped_refptr<URLRequestContextGetter> request_context_getter_; | 586 scoped_refptr<URLRequestContextGetter> request_context_getter_; |
| 588 | 587 |
| 589 // Used for history service request management. | 588 // Used for history service request management. |
| 590 CancelableRequestConsumerTSimple<Observer*> cancelable_consumer_; | 589 CancelableRequestConsumerTSimple<Observer*> cancelable_consumer_; |
| 591 | 590 |
| 592 // Non-owning pointer for handling file writing on the download_thread_. | 591 // Non-owning pointer for handling file writing on the download_thread_. |
| 593 DownloadFileManager* file_manager_; | 592 DownloadFileManager* file_manager_; |
| 594 | 593 |
| 595 // A pointer to the main UI loop. | |
| 596 MessageLoop* ui_loop_; | |
| 597 | |
| 598 // A pointer to the file thread's loop. The file thread lives longer than | |
| 599 // the DownloadManager, so this is safe to cache. | |
| 600 MessageLoop* file_loop_; | |
| 601 | |
| 602 // User preferences | 594 // User preferences |
| 603 BooleanPrefMember prompt_for_download_; | 595 BooleanPrefMember prompt_for_download_; |
| 604 StringPrefMember download_path_; | 596 StringPrefMember download_path_; |
| 605 | 597 |
| 606 // The user's last choice for download directory. This is only used when the | 598 // The user's last choice for download directory. This is only used when the |
| 607 // user wants us to prompt for a save location for each download. | 599 // user wants us to prompt for a save location for each download. |
| 608 FilePath last_download_path_; | 600 FilePath last_download_path_; |
| 609 | 601 |
| 610 // Set of file extensions to open at download completion. | 602 // Set of file extensions to open at download completion. |
| 611 struct AutoOpenCompareFunctor { | 603 struct AutoOpenCompareFunctor { |
| (...skipping 17 matching lines...) Expand all Loading... |
| 629 PendingFinishedMap pending_finished_downloads_; | 621 PendingFinishedMap pending_finished_downloads_; |
| 630 | 622 |
| 631 // The "Save As" dialog box used to ask the user where a file should be | 623 // The "Save As" dialog box used to ask the user where a file should be |
| 632 // saved. | 624 // saved. |
| 633 scoped_refptr<SelectFileDialog> select_file_dialog_; | 625 scoped_refptr<SelectFileDialog> select_file_dialog_; |
| 634 | 626 |
| 635 DISALLOW_COPY_AND_ASSIGN(DownloadManager); | 627 DISALLOW_COPY_AND_ASSIGN(DownloadManager); |
| 636 }; | 628 }; |
| 637 | 629 |
| 638 #endif // CHROME_BROWSER_DOWNLOAD_DOWNLOAD_MANAGER_H_ | 630 #endif // CHROME_BROWSER_DOWNLOAD_DOWNLOAD_MANAGER_H_ |
| OLD | NEW |