chore: use std::make_unique/base::MakeRefCounted when possible (#29510)
This commit is contained in:
parent
a4decffe9a
commit
79cb5144ae
38 changed files with 106 additions and 101 deletions
|
@ -197,13 +197,13 @@ void GetUploadedReports(
|
|||
#else
|
||||
scoped_refptr<UploadList> CreateCrashUploadList() {
|
||||
#if defined(OS_MAC) || defined(OS_WIN)
|
||||
return new CrashUploadListCrashpad();
|
||||
return base::MakeRefCounted<CrashUploadListCrashpad>();
|
||||
#else
|
||||
base::FilePath crash_dir_path;
|
||||
base::PathService::Get(electron::DIR_CRASH_DUMPS, &crash_dir_path);
|
||||
base::FilePath upload_log_path =
|
||||
crash_dir_path.AppendASCII(CrashUploadList::kReporterLogFilename);
|
||||
return new TextLogUploadList(upload_log_path);
|
||||
return base::MakeRefCounted<TextLogUploadList>(upload_log_path);
|
||||
#endif // defined(OS_MAC) || defined(OS_WIN)
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue