-
Notifications
You must be signed in to change notification settings - Fork 109
Overrides user-data-dir by exe name on Windows #276
Conversation
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) |
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.
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
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.
@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
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.
This change didn't require user-data-dir-name
or user-data-dir
switch. It will be overwritten if any of these switches present.
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.
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)
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.
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
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.
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.
I will change all the user-data-dir
to user-data-dir-name
after #279 merged
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.
Change looks good to me- pending approval by @bridiver
@darkdh can you please rebase this, sir? 😄 |
this change can't be used, I'm closing in favor of changes in #279 |
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