support open browser
This commit is contained in:
@@ -7,6 +7,7 @@ use std::{
|
||||
use serde_json::Value;
|
||||
|
||||
use crate::{
|
||||
browsers::browser_definitions,
|
||||
models::{
|
||||
BookmarkSummary, BrowserDefinition, BrowserStats, BrowserView, ExtensionSummary,
|
||||
ProfileSummary, ScanResponse, TempBookmark, TempExtension,
|
||||
@@ -30,26 +31,6 @@ pub fn scan_browsers() -> Result<ScanResponse, String> {
|
||||
Ok(ScanResponse { browsers })
|
||||
}
|
||||
|
||||
fn browser_definitions() -> Vec<BrowserDefinition> {
|
||||
vec![
|
||||
BrowserDefinition {
|
||||
id: "chrome",
|
||||
name: "Google Chrome",
|
||||
local_app_data_segments: &["Google", "Chrome", "User Data"],
|
||||
},
|
||||
BrowserDefinition {
|
||||
id: "edge",
|
||||
name: "Microsoft Edge",
|
||||
local_app_data_segments: &["Microsoft", "Edge", "User Data"],
|
||||
},
|
||||
BrowserDefinition {
|
||||
id: "brave",
|
||||
name: "Brave",
|
||||
local_app_data_segments: &["BraveSoftware", "Brave-Browser", "User Data"],
|
||||
},
|
||||
]
|
||||
}
|
||||
|
||||
fn scan_browser(local_app_data: &Path, definition: BrowserDefinition) -> Option<BrowserView> {
|
||||
let root = definition
|
||||
.local_app_data_segments
|
||||
|
||||
Reference in New Issue
Block a user