1 --- src/3rdparty/chromium/base/process/process_linux.cc.orig 2021-12-15 16:12:54 UTC 2 +++ src/3rdparty/chromium/base/process/process_linux.cc 3 @@ -24,7 +24,9 @@ namespace { 4 5 namespace { 6 7 +#if !defined(OS_BSD) 8 const int kForegroundPriority = 0; 9 +#endif 10 11 #if defined(OS_CHROMEOS) || BUILDFLAG(IS_LACROS) 12 // We are more aggressive in our lowering of background process priority 13 @@ -69,7 +71,7 @@ struct CGroups { 14 return groups; 15 } 16 }; 17 -#else 18 +#elif !defined(OS_BSD) 19 const int kBackgroundPriority = 5; 20 #endif // defined(OS_CHROMEOS) || BUILDFLAG(IS_LACROS) 21 22 @@ -96,13 +98,18 @@ Time Process::CreationTime() const { 23 if (!start_ticks) 24 return Time(); 25 26 +#if defined(OS_BSD) 27 + return Time::FromTimeT(start_ticks); 28 +#else 29 TimeDelta start_offset = internal::ClockTicksToTimeDelta(start_ticks); 30 Time boot_time = internal::GetBootTime(); 31 if (boot_time.is_null()) 32 return Time(); 33 return Time(boot_time + start_offset); 34 +#endif 35 } 36 37 +#if !defined(OS_BSD) 38 // static 39 bool Process::CanBackgroundProcesses() { 40 #if defined(OS_CHROMEOS) || BUILDFLAG(IS_LACROS) 41 @@ -154,6 +161,7 @@ bool Process::SetProcessBackgrounded(bool background) 42 DPCHECK(result == 0); 43 return result == 0; 44 } 45 +#endif // !defined(OS_BSD) 46 47 #if defined(OS_CHROMEOS) || BUILDFLAG(IS_LACROS) 48 bool IsProcessBackgroundedCGroup(const StringPiece& cgroup_contents) { 49