зеркало из https://github.com/electron/electron.git
move some files from content/public/browser to components/download/public/core
https://chromium-review.googlesource.com/891686
This commit is contained in:
Родитель
4e580d5b39
Коммит
7fc8814d13
|
@ -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<download::DownloadItem::ReceivedSlice>());
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче