feat: bring --enable-logging functionality in line with Chromium (#25089)
Co-authored-by: Jeremy Rose <jeremya@chromium.org>
This commit is contained in:
parent
c841247815
commit
8ccab4ce91
18 changed files with 553 additions and 54 deletions
|
@ -100,6 +100,7 @@
|
|||
#include "shell/common/api/api.mojom.h"
|
||||
#include "shell/common/application_info.h"
|
||||
#include "shell/common/electron_paths.h"
|
||||
#include "shell/common/logging.h"
|
||||
#include "shell/common/options_switches.h"
|
||||
#include "shell/common/platform_util.h"
|
||||
#include "third_party/blink/public/common/loader/url_loader_throttle.h"
|
||||
|
@ -542,6 +543,15 @@ void ElectronBrowserClient::AppendExtraCommandLineSwitches(
|
|||
}
|
||||
#endif
|
||||
|
||||
// The zygote process is booted before JS runs, so DIR_USER_DATA isn't usable
|
||||
// at that time. It doesn't need --user-data-dir to be correct anyway, since
|
||||
// the zygote itself doesn't access anything in that directory.
|
||||
if (process_type != ::switches::kZygoteProcess) {
|
||||
base::FilePath user_data_dir;
|
||||
if (base::PathService::Get(chrome::DIR_USER_DATA, &user_data_dir))
|
||||
command_line->AppendSwitchPath(::switches::kUserDataDir, user_data_dir);
|
||||
}
|
||||
|
||||
if (process_type == ::switches::kUtilityProcess ||
|
||||
process_type == ::switches::kRendererProcess) {
|
||||
// Copy following switches to child process.
|
||||
|
@ -794,6 +804,11 @@ bool ElectronBrowserClient::ArePersistentMediaDeviceIDsAllowed(
|
|||
return true;
|
||||
}
|
||||
|
||||
base::FilePath ElectronBrowserClient::GetLoggingFileName(
|
||||
const base::CommandLine& cmd_line) {
|
||||
return logging::GetLogFileName(cmd_line);
|
||||
}
|
||||
|
||||
void ElectronBrowserClient::SiteInstanceDeleting(
|
||||
content::SiteInstance* site_instance) {
|
||||
#if BUILDFLAG(ENABLE_ELECTRON_EXTENSIONS)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue