Fix path override ordering (fixes #3749)

The chrome::DIR_RESOURCES and ui::DIR_LOCALES overrides need to be
configured before calling ChromeMainDelegate::PreSandboxStartup.
This commit is contained in:
Marshall Greenblatt 2024-08-08 13:39:15 -04:00
parent ebb3c962da
commit 889cfcf8d1
1 changed files with 6 additions and 6 deletions

View File

@ -377,12 +377,6 @@ void ChromeMainDelegateCef::PreSandboxStartup() {
// number in the app bundle path.
resource_util::OverrideUserDataDir(settings_, command_line);
ChromeMainDelegate::PreSandboxStartup();
// Initialize crash reporting state for this process/module.
// chrome::DIR_CRASH_DUMPS must be configured before calling this function.
crash_reporting::PreSandboxStartup(*command_line, process_type);
base::FilePath resources_dir;
if (command_line->HasSwitch(switches::kResourcesDirPath)) {
resources_dir =
@ -403,6 +397,12 @@ void ChromeMainDelegateCef::PreSandboxStartup() {
}
}
ChromeMainDelegate::PreSandboxStartup();
// Initialize crash reporting state for this process/module.
// chrome::DIR_CRASH_DUMPS must be configured before calling this function.
crash_reporting::PreSandboxStartup(*command_line, process_type);
#if !BUILDFLAG(IS_WIN)
// Call after InitLogging() potentially changes values in
// chrome/app/chrome_main_delegate.cc.