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 12 matching lines...) Expand all Loading... | |
23 #include "content/public/browser/download_manager.h" | 23 #include "content/public/browser/download_manager.h" |
24 | 24 |
25 class DownloadStatusUpdater; | 25 class DownloadStatusUpdater; |
26 | 26 |
27 class CONTENT_EXPORT DownloadManagerImpl | 27 class CONTENT_EXPORT DownloadManagerImpl |
28 : public content::DownloadManager, | 28 : public content::DownloadManager, |
29 public DownloadItemImpl::Delegate, | 29 public DownloadItemImpl::Delegate, |
30 public DownloadStatusUpdaterDelegate { | 30 public DownloadStatusUpdaterDelegate { |
31 public: | 31 public: |
32 DownloadManagerImpl(content::DownloadManagerDelegate* delegate, | 32 DownloadManagerImpl(content::DownloadManagerDelegate* delegate, |
33 DownloadStatusUpdater* status_updater); | 33 DownloadStatusUpdater* status_updater, |
34 net::NetLog* net_log); | |
34 | 35 |
35 // content::DownloadManager functions. | 36 // content::DownloadManager functions. |
36 virtual void Shutdown() OVERRIDE; | 37 virtual void Shutdown() OVERRIDE; |
37 virtual void GetTemporaryDownloads(const FilePath& dir_path, | 38 virtual void GetTemporaryDownloads(const FilePath& dir_path, |
38 DownloadVector* result) OVERRIDE; | 39 DownloadVector* result) OVERRIDE; |
39 virtual void GetAllDownloads(const FilePath& dir_path, | 40 virtual void GetAllDownloads(const FilePath& dir_path, |
40 DownloadVector* result) OVERRIDE; | 41 DownloadVector* result) OVERRIDE; |
41 virtual void SearchDownloads(const string16& query, | 42 virtual void SearchDownloads(const string16& query, |
42 DownloadVector* result) OVERRIDE; | 43 DownloadVector* result) OVERRIDE; |
43 virtual bool Init(content::BrowserContext* browser_context) OVERRIDE; | 44 virtual bool Init(content::BrowserContext* browser_context) OVERRIDE; |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
89 virtual void RestartDownload(int32 download_id) OVERRIDE; | 90 virtual void RestartDownload(int32 download_id) OVERRIDE; |
90 virtual void CheckForHistoryFilesRemoval() OVERRIDE; | 91 virtual void CheckForHistoryFilesRemoval() OVERRIDE; |
91 virtual content::DownloadItem* GetDownloadItem(int id) OVERRIDE; | 92 virtual content::DownloadItem* GetDownloadItem(int id) OVERRIDE; |
92 virtual void SavePageDownloadFinished( | 93 virtual void SavePageDownloadFinished( |
93 content::DownloadItem* download) OVERRIDE; | 94 content::DownloadItem* download) OVERRIDE; |
94 virtual content::DownloadItem* GetActiveDownloadItem(int id) OVERRIDE; | 95 virtual content::DownloadItem* GetActiveDownloadItem(int id) OVERRIDE; |
95 virtual bool GenerateFileHash() OVERRIDE; | 96 virtual bool GenerateFileHash() OVERRIDE; |
96 virtual content::DownloadManagerDelegate* delegate() const OVERRIDE; | 97 virtual content::DownloadManagerDelegate* delegate() const OVERRIDE; |
97 virtual void SetDownloadManagerDelegate( | 98 virtual void SetDownloadManagerDelegate( |
98 content::DownloadManagerDelegate* delegate) OVERRIDE; | 99 content::DownloadManagerDelegate* delegate) OVERRIDE; |
100 virtual net::NetLog* GetNetLog() OVERRIDE; | |
Randy Smith (Not in Mondays)
2012/02/03 19:22:13
Why is this public? I may have missed it, but I d
ahendrickson
2012/02/05 05:06:53
It is no longer part of the DownloadManager interf
| |
99 | 101 |
100 // Overridden from DownloadItemImpl::Delegate | 102 // Overridden from DownloadItemImpl::Delegate |
101 // (Note that |GetBrowserContext| are present in both interfaces.) | 103 // (Note that |GetBrowserContext| are present in both interfaces.) |
102 virtual bool ShouldOpenDownload(content::DownloadItem* item) OVERRIDE; | 104 virtual bool ShouldOpenDownload(content::DownloadItem* item) OVERRIDE; |
103 virtual bool ShouldOpenFileBasedOnExtension( | 105 virtual bool ShouldOpenFileBasedOnExtension( |
104 const FilePath& path) OVERRIDE; | 106 const FilePath& path) OVERRIDE; |
105 virtual void CheckForFileRemoval( | 107 virtual void CheckForFileRemoval( |
106 content::DownloadItem* download_item) OVERRIDE; | 108 content::DownloadItem* download_item) OVERRIDE; |
107 virtual void MaybeCompleteDownload( | 109 virtual void MaybeCompleteDownload( |
108 content::DownloadItem* download) OVERRIDE; | 110 content::DownloadItem* download) OVERRIDE; |
(...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
256 // user wants us to prompt for a save location for each download. | 258 // user wants us to prompt for a save location for each download. |
257 FilePath last_download_path_; | 259 FilePath last_download_path_; |
258 | 260 |
259 // Allows an embedder to control behavior. Guaranteed to outlive this object. | 261 // Allows an embedder to control behavior. Guaranteed to outlive this object. |
260 content::DownloadManagerDelegate* delegate_; | 262 content::DownloadManagerDelegate* delegate_; |
261 | 263 |
262 // TODO(rdsmith): Remove when http://crbug.com/85408 is fixed. | 264 // TODO(rdsmith): Remove when http://crbug.com/85408 is fixed. |
263 // For debugging only. | 265 // For debugging only. |
264 int64 largest_db_handle_in_history_; | 266 int64 largest_db_handle_in_history_; |
265 | 267 |
268 net::NetLog* net_log_; | |
269 | |
266 DISALLOW_COPY_AND_ASSIGN(DownloadManagerImpl); | 270 DISALLOW_COPY_AND_ASSIGN(DownloadManagerImpl); |
267 }; | 271 }; |
268 | 272 |
269 #endif // CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_MANAGER_IMPL_H_ | 273 #endif // CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_MANAGER_IMPL_H_ |
OLD | NEW |