feat: add Chromium Browser with new v2 architecture (#530)

* feat: add Chromium Browser implementation with new architecture
* refactor: replace Walk with ReadDir+Stat for profile discovery
* refactor: remove queries override, use extractors for Yandex passwords
* refactor: remove dataSource wrapper, use []sourcePath directly
* fix: address Copilot review feedback on chromium_new.go
* fix: always call key retriever regardless of Local State existence
This commit is contained in:
Roger
2026-04-02 22:36:12 +08:00
committed by moonD4rk
parent 1ec2781131
commit 1b8bb1df3d
9 changed files with 899 additions and 54 deletions
+33
View File
@@ -69,3 +69,36 @@ func NonSensitiveCategories() []Category {
}
return cats
}
// BrowserKind identifies the browser engine type.
type BrowserKind int
const (
KindChromium BrowserKind = iota
KindChromiumYandex // Chromium variant with different file names and extract logic
KindChromiumOpera // Opera: extensions in "opsettings" key, data in Roaming
KindFirefox
)
// BrowserConfig holds the declarative configuration for a browser installation.
type BrowserConfig struct {
Key string // lookup key: "chrome", "edge", "firefox"
Name string // display name: "Chrome", "Edge", "Firefox"
Kind BrowserKind // engine type
Storage string // keychain/GNOME label (macOS/Linux); unused on Windows
KeychainPassword string // macOS login password for KeychainPasswordRetriever; ignored on Windows/Linux
UserDataDir string // base browser directory
}
// BrowserData holds all extracted browser data with typed slices.
type BrowserData struct {
Passwords []LoginEntry
Cookies []CookieEntry
Histories []HistoryEntry
Downloads []DownloadEntry
Bookmarks []BookmarkEntry
CreditCards []CreditCardEntry
Extensions []ExtensionEntry
LocalStorage []StorageEntry
SessionStorage []StorageEntry
}