From 7fc8814d13333edf2244ed07411e6cd45c9ceb21 Mon Sep 17 00:00:00 2001 From: Aleksei Kuzmin Date: Tue, 10 Apr 2018 17:58:49 +0200 Subject: [PATCH] move some files from content/public/browser to components/download/public/core https://chromium-review.googlesource.com/891686 --- atom/browser/api/atom_api_session.cc | 3 ++- atom/browser/atom_download_manager_delegate.cc | 7 ++++--- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/atom/browser/api/atom_api_session.cc b/atom/browser/api/atom_api_session.cc index 0d9fcdfeb034..8e4180abaeb4 100644 --- a/atom/browser/api/atom_api_session.cc +++ b/atom/browser/api/atom_api_session.cc @@ -33,6 +33,7 @@ #include "brightray/browser/media/media_device_id_salt.h" #include "chrome/browser/browser_process.h" #include "chrome/common/pref_names.h" +#include "components/download/public/common/download_danger_type.h" #include "components/prefs/pref_service.h" #include "content/public/browser/browser_thread.h" #include "content/public/browser/download_item_utils.h" @@ -435,7 +436,7 @@ void DownloadIdCallback(content::DownloadManager* download_manager, GURL(), mime_type, mime_type, start_time, base::Time(), etag, last_modified, offset, length, std::string(), download::DownloadItem::INTERRUPTED, - content::DownloadDangerType::DOWNLOAD_DANGER_TYPE_NOT_DANGEROUS, + download::DOWNLOAD_DANGER_TYPE_NOT_DANGEROUS, content::DOWNLOAD_INTERRUPT_REASON_NETWORK_TIMEOUT, false, base::Time(), false, std::vector()); } diff --git a/atom/browser/atom_download_manager_delegate.cc b/atom/browser/atom_download_manager_delegate.cc index ee0141ff3bc4..8a0cceaebd8a 100644 --- a/atom/browser/atom_download_manager_delegate.cc +++ b/atom/browser/atom_download_manager_delegate.cc @@ -16,6 +16,7 @@ #include "base/files/file_util.h" #include "base/task_scheduler/post_task.h" #include "chrome/common/pref_names.h" +#include "components/download/public/common/download_danger_type.h" #include "components/prefs/pref_service.h" #include "content/public/browser/browser_context.h" #include "content/public/browser/browser_thread.h" @@ -119,7 +120,7 @@ void AtomDownloadManagerDelegate::OnDownloadPathGenerated( // download should be cancelled. // If user cancels the file save dialog, run the callback with empty FilePath. callback.Run(path, download::DownloadItem::TARGET_DISPOSITION_PROMPT, - content::DOWNLOAD_DANGER_TYPE_NOT_DANGEROUS, path, + download::DOWNLOAD_DANGER_TYPE_NOT_DANGEROUS, path, path.empty() ? content::DOWNLOAD_INTERRUPT_REASON_USER_CANCELED : content::DOWNLOAD_INTERRUPT_REASON_NONE); } @@ -137,7 +138,7 @@ bool AtomDownloadManagerDelegate::DetermineDownloadTarget( if (!download->GetForcedFilePath().empty()) { callback.Run(download->GetForcedFilePath(), download::DownloadItem::TARGET_DISPOSITION_OVERWRITE, - content::DOWNLOAD_DANGER_TYPE_NOT_DANGEROUS, + download::DOWNLOAD_DANGER_TYPE_NOT_DANGEROUS, download->GetForcedFilePath(), content::DOWNLOAD_INTERRUPT_REASON_NONE); return true; @@ -149,7 +150,7 @@ bool AtomDownloadManagerDelegate::DetermineDownloadTarget( if (!save_path.empty()) { callback.Run(save_path, download::DownloadItem::TARGET_DISPOSITION_OVERWRITE, - content::DOWNLOAD_DANGER_TYPE_NOT_DANGEROUS, + download::DOWNLOAD_DANGER_TYPE_NOT_DANGEROUS, save_path, content::DOWNLOAD_INTERRUPT_REASON_NONE); return true; }