Skip to content

Conversation

@AdityaVKochar
Copy link
Contributor

#8

Added functions

  1. get_browsers => Will give list of names of available browsers using crowser crate.
  2. get_chrome_profiles => Will give list of name of chrome profiles. Works by getting into Local State file in LocalAPPData of Chrome and extracting info from there.

@AdityaVKochar
Copy link
Contributor Author

PR #17 has more info on this

@theg1239
Copy link
Member

Can you add support for other browsers as well, ideally the major browsers (Firefox, Brave, Edge)

@theg1239
Copy link
Member

@codex review deeply

Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines 40 to 44
let info_cache = json_value
.get("profile")
.and_then(|p| p.get("info_cache"))
.and_then(|ic| ic.as_object())
.ok_or_else(|| "Could not find 'profile' or 'info_cache' in JSON.")?;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Use an error type compatible with Box<dyn Error>

In get_chrome_profiles, the ok_or_else call returns an Err(&str), but the function’s error type is Box<dyn std::error::Error>. The ? operator cannot convert a plain string slice into a boxed error, so the function will not compile once this module is referenced. Wrap the message in a concrete error type (e.g., io::Error) or box it before returning.

Useful? React with 👍 / 👎.

@pokymono
Copy link
Contributor

@AdityaVKochar resolve the error type compatibility

@chatgpt-codex-connector
Copy link

To use Codex here, create a Codex account and connect to github.

@AdityaVKochar
Copy link
Contributor Author

@theg1239 added for chromium based browsers and firefox
Cannot find resource for Safari as it's profiles not in user-editable formats

@theg1239
Copy link
Member

@codex review

Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +98 to +101
let base_dir = if cfg!(target_os = "windows") || cfg!(target_os = "macos") {
data_local_dir()
} else {
dirs::home_dir()

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Firefox profiles looked up under Local instead of Roaming AppData

On Windows the function builds the base directory using dirs::data_local_dir() before appending Mozilla\Firefox\Profiles, but Firefox stores profiles under %APPDATA% (Roaming) rather than Local. With the current path the directory almost always does not exist, so the function returns an empty list even when profiles are present. Use dirs::data_dir() or the roaming path instead.

Useful? React with 👍 / 👎.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@AdityaVKochar can you verify this?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

works for both local and roaming
tested

Comment on lines 112 to 113
#[cfg(target_os = "linux")]
path.push("mozilla-firefox/");

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Linux Firefox profile directory is mis-specified

For Linux the code appends "mozilla-firefox/" beneath the user’s home directory, but Firefox stores its profiles under ~/.mozilla/firefox. Because of the missing leading dot and incorrect directory name, the constructed path never exists and no profiles are discovered. Adjust the path to ~/.mozilla/firefox.

Useful? React with 👍 / 👎.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@AdityaVKochar this as well along with the other issue

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed the paths

@theg1239 theg1239 merged commit 9763b2f into ACM-VIT:main Oct 18, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants