1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-06 00:13:28 +00:00

chromium importer working in sandbox

This commit is contained in:
John Harrington
2025-11-19 15:22:23 -07:00
parent f40233fce4
commit aa42630410
13 changed files with 162 additions and 57 deletions

View File

@@ -1182,11 +1182,18 @@ pub mod chromium_importer {
.map_err(|e| napi::Error::from_reason(e.to_string()))
}
#[cfg_attr(all(target_os = "macos", feature = "sandbox"), napi)]
#[cfg(all(target_os = "macos", feature = "sandbox"))]
#[napi]
pub fn request_browser_access(browser: String) -> napi::Result<()> {
chromium_importer::chromium::request_browser_access(&browser)
.map_err(|e| napi::Error::from_reason(e.to_string()))
#[cfg(all(target_os = "macos", feature = "sandbox"))]
{
chromium_importer::chromium::request_browser_access(&browser)
.map_err(|e| napi::Error::from_reason(e.to_string()))
}
#[cfg(not(all(target_os = "macos", feature = "sandbox")))]
{
// No-op when built without sandbox feature
Ok(())
}
}
}