| Index: chrome/browser/download/download_service.h
|
| ===================================================================
|
| --- chrome/browser/download/download_service.h (revision 140592)
|
| +++ chrome/browser/download/download_service.h (working copy)
|
| @@ -18,10 +18,10 @@
|
|
|
| namespace content {
|
| class DownloadManager;
|
| +class DownloadManagerDelegate;
|
| }
|
|
|
| -// Owning class for DownloadManager (content) and
|
| -// ChromeDownloadManagerDelegate (chrome)
|
| +// Owning class for ChromeDownloadManagerDelegate.
|
| class DownloadService : public ProfileKeyedService {
|
| public:
|
| explicit DownloadService(Profile* profile);
|
| @@ -32,11 +32,10 @@
|
| OnManagerCreatedCallback;
|
| void OnManagerCreated(const OnManagerCreatedCallback& cb);
|
|
|
| - // Get the download manager. Creates the download manager if
|
| - // it does not already exist.
|
| - content::DownloadManager* GetDownloadManager();
|
| + // Get the download manager delegate, creating it if it doesn't already exist.
|
| + content::DownloadManagerDelegate* GetDownloadManagerDelegate();
|
|
|
| - // Has a download manager been created? (By calling above function.)
|
| + // Has a download manager been created?
|
| bool HasCreatedDownloadManager();
|
|
|
| // Number of downloads associated with this instance of the service.
|
| @@ -59,14 +58,9 @@
|
| bool download_manager_created_;
|
| Profile* profile_;
|
|
|
| - // Both of these objects are owned by this class.
|
| - // DownloadManager is RefCountedThreadSafe because of references
|
| - // from DownloadFile objects on the FILE thread, and may need to be
|
| - // kept alive until those objects are deleted.
|
| // ChromeDownloadManagerDelegate may be the target of callbacks from
|
| // the history service/DB thread and must be kept alive for those
|
| // callbacks.
|
| - scoped_refptr<content::DownloadManager> manager_;
|
| scoped_refptr<ChromeDownloadManagerDelegate> manager_delegate_;
|
|
|
| std::vector<OnManagerCreatedCallback> on_manager_created_callbacks_;
|
|
|