mirror of
https://github.com/bitwarden/browser
synced 2025-12-06 00:13:28 +00:00
[PM-27358] Remove unused getInstalledBrowsers method (#17019)
* Remove unused getInstalledBrowsers metthod * Run cargo fmt --------- Co-authored-by: Daniel James Smith <djsmith85@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
parent
2b2b1f4a27
commit
8eef78960d
1
apps/desktop/desktop_native/napi/index.d.ts
vendored
1
apps/desktop/desktop_native/napi/index.d.ts
vendored
@@ -247,7 +247,6 @@ export declare namespace chromium_importer {
|
||||
}
|
||||
/** Returns OS aware metadata describing supported Chromium based importers as a JSON string. */
|
||||
export function getMetadata(): Record<string, NativeImporterMetadata>
|
||||
export function getInstalledBrowsers(): Array<string>
|
||||
export function getAvailableProfiles(browser: string): Array<ProfileInfo>
|
||||
export function importLogins(browser: string, profileId: string): Promise<Array<LoginImportResult>>
|
||||
}
|
||||
|
||||
@@ -1066,8 +1066,8 @@ pub mod logging {
|
||||
pub mod chromium_importer {
|
||||
use chromium_importer::{
|
||||
chromium::{
|
||||
DefaultInstalledBrowserRetriever, InstalledBrowserRetriever,
|
||||
LoginImportResult as _LoginImportResult, ProfileInfo as _ProfileInfo,
|
||||
DefaultInstalledBrowserRetriever, LoginImportResult as _LoginImportResult,
|
||||
ProfileInfo as _ProfileInfo,
|
||||
},
|
||||
metadata::NativeImporterMetadata as _NativeImporterMetadata,
|
||||
};
|
||||
@@ -1159,12 +1159,6 @@ pub mod chromium_importer {
|
||||
.collect()
|
||||
}
|
||||
|
||||
#[napi]
|
||||
pub fn get_installed_browsers() -> napi::Result<Vec<String>> {
|
||||
chromium_importer::chromium::DefaultInstalledBrowserRetriever::get_installed_browsers()
|
||||
.map_err(|e| napi::Error::from_reason(e.to_string()))
|
||||
}
|
||||
|
||||
#[napi]
|
||||
pub fn get_available_profiles(browser: String) -> napi::Result<Vec<ProfileInfo>> {
|
||||
chromium_importer::chromium::get_available_profiles(&browser)
|
||||
|
||||
@@ -8,10 +8,6 @@ export class ChromiumImporterService {
|
||||
return await chromium_importer.getMetadata();
|
||||
});
|
||||
|
||||
ipcMain.handle("chromium_importer.getInstalledBrowsers", async (event) => {
|
||||
return await chromium_importer.getInstalledBrowsers();
|
||||
});
|
||||
|
||||
ipcMain.handle("chromium_importer.getAvailableProfiles", async (event, browser: string) => {
|
||||
return await chromium_importer.getAvailableProfiles(browser);
|
||||
});
|
||||
|
||||
@@ -5,8 +5,6 @@ import type { chromium_importer } from "@bitwarden/desktop-napi";
|
||||
const chromiumImporter = {
|
||||
getMetadata: (): Promise<Record<string, chromium_importer.NativeImporterMetadata>> =>
|
||||
ipcRenderer.invoke("chromium_importer.getMetadata"),
|
||||
getInstalledBrowsers: (): Promise<string[]> =>
|
||||
ipcRenderer.invoke("chromium_importer.getInstalledBrowsers"),
|
||||
getAvailableProfiles: (browser: string): Promise<any[]> =>
|
||||
ipcRenderer.invoke("chromium_importer.getAvailableProfiles", browser),
|
||||
importLogins: (browser: string, profileId: string): Promise<any[]> =>
|
||||
|
||||
Reference in New Issue
Block a user