search_hub

at 4551d56 Raw

use crate::importer::gecko;
use crate::importer::Importer;
use crate::models::Bookmark;
use std::path::{Path, PathBuf};

pub struct FirefoxImporter;

impl Importer for FirefoxImporter {
    fn name(&self) -> &'static str {
        "Firefox"
    }

    fn discover_profiles(&self) -> Vec<PathBuf> {
        gecko::discover_profiles(".mozilla/firefox")
    }

    fn import(&self, profile_path: &Path) -> anyhow::Result<Vec<Bookmark>> {
        gecko::query_bookmarks(profile_path)
    }

    fn import_history(&self, profile_path: &Path) -> anyhow::Result<Vec<Bookmark>> {
        gecko::query_history(profile_path)
    }
}