Chromium Code Reviews| Index: content/browser/child_process_launcher.cc |
| diff --git a/content/browser/child_process_launcher.cc b/content/browser/child_process_launcher.cc |
| index e5c93ee3562bbecd378d96c671d77c4fe219c39e..53499b99170e99b3a5feade3b8b6a8c79415f92b 100644 |
| --- a/content/browser/child_process_launcher.cc |
| +++ b/content/browser/child_process_launcher.cc |
| @@ -12,6 +12,7 @@ |
| #include "base/files/scoped_file.h" |
| #include "base/logging.h" |
| #include "base/memory/scoped_ptr.h" |
| +#include "base/metrics/field_trial.h" |
| #include "base/metrics/histogram.h" |
| #include "base/process/process.h" |
| #include "base/synchronization/lock.h" |
| @@ -503,7 +504,17 @@ void ChildProcessLauncher::Context::Terminate() { |
| void ChildProcessLauncher::Context::SetProcessBackgroundedInternal( |
| base::Process process, |
| bool background) { |
| +#if defined(OS_MACOSX) |
| + base::FieldTrial* trial = |
| + base::FieldTrialList::Find("BackgroundMacRendererProcesses"); |
|
Alexei Svitkine (slow)
2015/03/11 15:30:54
Nit: You can just use FindFullName() and then the
shrike
2015/03/11 21:38:21
Done.
|
| + if (trial && trial->group_name() == "On") { |
|
gab
2015/03/10 12:33:02
I would suggest taking this path by default in the
shrike
2015/03/10 18:00:33
OK. Will Finch flags be available soon enough afte
gab
2015/03/10 19:43:50
Yes, Finch is brought up before creating any threa
Alexei Svitkine (slow)
2015/03/11 15:30:54
Correct.
|
| + MachBroker* broker = MachBroker::GetInstance(); |
| + process.SetProcessBackgrounded(broker->TaskForPid(process.Pid()), |
| + background); |
| + } |
| +#else |
| process.SetProcessBackgrounded(background); |
| +#endif // defined(OS_MACOSX) |
| #if defined(OS_ANDROID) |
| SetChildProcessInForeground(process.Handle(), !background); |
| #endif |