Chromium Code Reviews| Index: chrome/browser/ui/webui/active_downloads_ui.cc |
| =================================================================== |
| --- chrome/browser/ui/webui/active_downloads_ui.cc (revision 89670) |
| +++ chrome/browser/ui/webui/active_downloads_ui.cc (working copy) |
| @@ -114,6 +114,10 @@ |
| void OpenNewFullWindow(const ListValue* args); |
| void PlayMediaFile(const ListValue* args); |
| + // For testing. |
| + typedef std::vector<DownloadItem*> DownloadList; |
| + const DownloadList& downloads() const { return downloads_; } |
| + |
| private: |
| // Downloads helpers. |
| DownloadItem* GetDownloadById(const ListValue* args); |
| @@ -126,7 +130,6 @@ |
| TabContents* tab_contents_; |
| DownloadManager* download_manager_; |
| - typedef std::vector<DownloadItem*> DownloadList; |
| DownloadList active_downloads_; |
| DownloadList downloads_; |
| @@ -433,3 +436,9 @@ |
| return NULL; |
| } |
| +const ActiveDownloadsUI::DownloadList& ActiveDownloadsUI::GetDownloads() const { |
| + DCHECK_EQ(handlers_.size(), size_t(2)); |
| + ActiveDownloadsHandler* handler = |
| + static_cast<ActiveDownloadsHandler*>(handlers_[1]); |
|
achuithb
2011/06/22 22:50:50
I don't like this either :/
xiyuan
2011/06/22 23:01:03
Me neither. What is the other handler here? How co
achuithb
2011/06/23 02:56:38
The other handler is the GenericHandler that all W
|
| + return handler->downloads(); |
| +} |