Skip to content
This repository has been archived by the owner on Jan 4, 2019. It is now read-only.

Overrides user-data-dir by exe name on Windows #276

Closed
wants to merge 2 commits into from
Closed

Conversation

darkdh
Copy link
Member

@darkdh darkdh commented Aug 17, 2017

It will be used for different channels release. ex.
BraveNightly.exe will use BraveNightly as user-data-dir name
BraveDeveloper.exe -> BraveDeveloper
BraveBeta.exe -> BraveBeta
brave.exe -> brave

It will be used for different channels release. ex.
BraveNightly.exe will use BraveNightly as user-data-dir name
...

Auditors: @bsclifton, @bridiver
@@ -156,6 +156,20 @@ base::FilePath InitializeUserDataDir() {
command_line->AppendSwitchPath(switches::kUserDataDir, user_data_dir);
}

#if defined(OS_WIN)
Copy link
Collaborator

Choose a reason for hiding this comment

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

the change we need to make is to use user-data-dir-name instead of user-data-dir and we can pass it just like we passed user-data-dir, but this code is going to conflict and cause issues with crash reporting changes

Copy link
Member

Choose a reason for hiding this comment

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

@bridiver can you expand on that more?

Are you saying that the change needs to do something like the following?

command_line->AppendSwitchPath(switches::kUserDataDirName, user_data_dir);

Why would we do this? The change as-is looks OK to me

Copy link
Member Author

Choose a reason for hiding this comment

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

This change didn't require user-data-dir-name or user-data-dir switch. It will be overwritten if any of these switches present.

Copy link
Collaborator

@bridiver bridiver Aug 25, 2017

Choose a reason for hiding this comment

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

we can't use user-data-dir like this anymore and this change will conflict with the crash reporting changes and it also doesn't the the value early enough (I am now setting it in atom_main.cc)

Copy link
Collaborator

Choose a reason for hiding this comment

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

see https://github.com/brave/muon/pull/279/files#diff-a2a29fbd6a5f9747649d3c2c444dae3fR93
but either way I don't think we should set it based on the exe name. We should use the new user-data-dir-name flag or the env var CHROME_USER_DATA_DIR

Copy link
Member

Choose a reason for hiding this comment

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

@bridiver I think the problem is that on Windows: how would you forcibly set this? The best option we have would be appending that to the Desktop shortcut... but that wouldn't cover all cases of course

Also: is the work @darkdh here for Linux using user-data-dir going to break crash reporting?

Copy link
Member Author

Choose a reason for hiding this comment

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

I will change all the user-data-dir to user-data-dir-name after #279 merged

Copy link
Member

@bsclifton bsclifton left a comment

Choose a reason for hiding this comment

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

Change looks good to me- pending approval by @bridiver

@bsclifton
Copy link
Member

@darkdh can you please rebase this, sir? 😄

@bridiver
Copy link
Collaborator

bridiver commented Sep 8, 2017

this change can't be used, I'm closing in favor of changes in #279

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants