Confirm dangerous downloads

This commit is contained in:
2026-05-07 22:27:20 -04:00
parent 912b7b4b94
commit d33c1e6a30
8 changed files with 393 additions and 114 deletions
@@ -79,6 +79,21 @@ impl BrowserCore {
Ok(())
}
pub fn confirm_download_security_prompt(
&mut self,
download_id: &DownloadId,
) -> Result<(), CoreError> {
self.download_entry_mut(download_id)?.confirm_security_prompt()?;
Ok(())
}
pub fn download_requires_security_confirmation(
&self,
download_id: &DownloadId,
) -> Result<bool, CoreError> {
Ok(self.visible_download_entry(download_id)?.requires_security_confirmation())
}
pub fn download_target_file_path(
&self,
download_id: &DownloadId,