chore: convert base::Bind instances across some files (#18112)

This commit is contained in:
Shelley Vohr 2019-05-02 16:49:27 -07:00 committed by Cheng Zhao
parent 4808f30538
commit cc00fa8874
7 changed files with 34 additions and 30 deletions

View file

@ -124,11 +124,11 @@ void AtomDownloadManagerDelegate::OnDownloadPathGenerated(
v8::Isolate* isolate = v8::Isolate::GetCurrent();
atom::util::Promise dialog_promise(isolate);
auto dialog_callback =
base::Bind(&AtomDownloadManagerDelegate::OnDownloadSaveDialogDone,
base::Unretained(this), download_id, callback);
base::BindOnce(&AtomDownloadManagerDelegate::OnDownloadSaveDialogDone,
base::Unretained(this), download_id, callback);
file_dialog::ShowSaveDialog(settings, std::move(dialog_promise));
ignore_result(dialog_promise.Then(dialog_callback));
ignore_result(dialog_promise.Then(std::move(dialog_callback)));
} else {
callback.Run(path, download::DownloadItem::TARGET_DISPOSITION_PROMPT,
download::DOWNLOAD_DANGER_TYPE_NOT_DANGEROUS, path,