-
Notifications
You must be signed in to change notification settings - Fork 903
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
BraveProfileLock #245
BraveProfileLock #245
Conversation
Resolves brave/brave-browser#423.
4e16043
to
c8f2c7e
Compare
base::FilePath user_data_dir = source_profile_.source_path.DirName(); | ||
browser_lock_.reset(new ChromeProfileLock(user_data_dir)); | ||
} else { // source_profile_.importer_type == importer::TYPE_BRAVE | ||
browser_lock_.reset(new BraveProfileLock(source_profile_.source_path)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why this can't be user_data_dir
just like ChromeProfileLock
uses?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Chrome supports profiles, so for Chrome source_path
is a subdirectory containing the profile data. Brave doesn't support profiles, so Brave's source_path
is already the user_data_dir
.
bool BraveExternalProcessImporterHost::CheckForChromeLock( | ||
const importer::SourceProfile& source_profile) { | ||
if (source_profile.importer_type != importer::TYPE_CHROME) | ||
bool BraveExternalProcessImporterHost::CheckForChromeOrBraveLock() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we change the name to more general naming like CheckForBrowserLock?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's what I was going for, but I don't think it should have the fully generic CheckForBrowserLock
name unless it also subsumes CheckForFirefoxLock
. I could do do that (e.g. by making FirefoxProfileLock
a subclass of BrowserProfileLock
, etc.) but that would require patching and since it isn't necessary I left it out.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
++
Thanks for the merge, @darkdh! I'm still doing manual testing of this PR on Linux and Windows, so if I find any issues there I'll fix them in follow-ups. |
Confirmed BraveProfileLock builds and passes manual tests on Linux. |
Confirmed BraveProfileLock builds and passes manual tests on Windows. |
Resolves brave/brave-browser#423.
Submitter Checklist:
git rebase -i
to squash commits (if needed).Test Plan:
Adapted from test plan in #101.
Manual testing
yarn start
Cross-platform testing
I have verified that this PR builds and passes the manual tests described above on macOS. I am waiting on builds for Windows and Linux, and will update this issue with the results of those builds and manual tests once they're available.
Reviewer Checklist: