summaryrefslogtreecommitdiffstats
path: root/chrome/browser/ui/webui/downloads_dom_handler.cc
diff options
context:
space:
mode:
Diffstat (limited to 'chrome/browser/ui/webui/downloads_dom_handler.cc')
-rw-r--r--chrome/browser/ui/webui/downloads_dom_handler.cc11
1 files changed, 6 insertions, 5 deletions
diff --git a/chrome/browser/ui/webui/downloads_dom_handler.cc b/chrome/browser/ui/webui/downloads_dom_handler.cc
index 131bcfc..91ff933 100644
--- a/chrome/browser/ui/webui/downloads_dom_handler.cc
+++ b/chrome/browser/ui/webui/downloads_dom_handler.cc
@@ -200,7 +200,6 @@ DictionaryValue* CreateDownloadItemValue(
// Filters out extension downloads and downloads that don't have a filename yet.
bool IsDownloadDisplayable(const content::DownloadItem& item) {
return (!download_crx_util::IsExtensionDownload(item) &&
- item.IsPersisted() &&
!item.IsTemporary() &&
!item.GetFileNameToReportUser().empty() &&
!item.GetTargetFilePath().empty());
@@ -328,8 +327,6 @@ void DownloadsDOMHandler::HandleGetDownloads(const base::ListValue* args) {
CountDownloadsDOMEvents(DOWNLOADS_DOM_EVENT_GET_DOWNLOADS);
search_text_ = ExtractStringValue(args);
SendCurrentDownloads();
- if (main_notifier_.GetManager())
- main_notifier_.GetManager()->CheckForHistoryFilesRemoval();
}
void DownloadsDOMHandler::HandleOpenFile(const base::ListValue* args) {
@@ -436,10 +433,14 @@ void DownloadsDOMHandler::ScheduleSendCurrentDownloads() {
void DownloadsDOMHandler::SendCurrentDownloads() {
update_scheduled_ = false;
content::DownloadManager::DownloadVector all_items, filtered_items;
- if (main_notifier_.GetManager())
+ if (main_notifier_.GetManager()) {
main_notifier_.GetManager()->GetAllDownloads(&all_items);
- if (original_notifier_.get() && original_notifier_->GetManager())
+ main_notifier_.GetManager()->CheckForHistoryFilesRemoval();
+ }
+ if (original_notifier_.get() && original_notifier_->GetManager()) {
original_notifier_->GetManager()->GetAllDownloads(&all_items);
+ original_notifier_->GetManager()->CheckForHistoryFilesRemoval();
+ }
DownloadQuery query;
if (!search_text_.empty()) {
scoped_ptr<base::Value> query_text(base::Value::CreateStringValue(