feat: support crashpad on linux (#29719)
This commit is contained in:
parent
612361c4da
commit
c9ba0d02d7
13 changed files with 547 additions and 455 deletions
|
@ -153,6 +153,9 @@ bool ElectronCrashReporterClient::GetCrashDumpLocation(
|
|||
base::FilePath* crash_dir) {
|
||||
bool result = base::PathService::Get(electron::DIR_CRASH_DUMPS, crash_dir);
|
||||
{
|
||||
// If the DIR_CRASH_DUMPS path is overridden with
|
||||
// app.setPath('crashDumps', ...) then the directory might not have been
|
||||
// created.
|
||||
base::ThreadRestrictions::ScopedAllowIO allow_io;
|
||||
if (result && !base::PathExists(*crash_dir)) {
|
||||
return base::CreateDirectory(*crash_dir);
|
||||
|
@ -162,13 +165,6 @@ bool ElectronCrashReporterClient::GetCrashDumpLocation(
|
|||
}
|
||||
#endif
|
||||
|
||||
#if defined(OS_MAC) || defined(OS_LINUX)
|
||||
bool ElectronCrashReporterClient::GetCrashMetricsLocation(
|
||||
base::FilePath* metrics_dir) {
|
||||
return base::PathService::Get(chrome::DIR_USER_DATA, metrics_dir);
|
||||
}
|
||||
#endif // OS_MAC || OS_LINUX
|
||||
|
||||
bool ElectronCrashReporterClient::IsRunningUnattended() {
|
||||
return !collect_stats_consent_;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue