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 28be72bb9c32eb853702adbdb0726379a3f9825c..21c02b60bd2ab3ee27932cc8ae2ad0bff6f84b44 100644 |
| --- a/content/browser/child_process_launcher.cc |
| +++ b/content/browser/child_process_launcher.cc |
| @@ -1,4 +1,4 @@ |
| -// Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| +// Copyright 2012 The Chromium Authors. All rights reserved. |
| // Use of this source code is governed by a BSD-style license that can be |
| // found in the LICENSE file. |
| @@ -9,6 +9,7 @@ |
| #include "base/files/file_util.h" |
| #include "base/logging.h" |
| #include "base/memory/scoped_ptr.h" |
| +#include "base/metrics/field_trial.h" |
|
Avi (use Gerrit)
2015/04/21 20:59:45
Do you need this include?
shrike
2015/04/21 21:08:33
No - removed.
|
| #include "base/metrics/histogram.h" |
| #include "base/process/process.h" |
| #include "base/profiler/scoped_tracker.h" |
| @@ -19,6 +20,7 @@ |
| #include "content/public/common/content_switches.h" |
| #include "content/public/common/result_codes.h" |
| #include "content/public/common/sandboxed_process_launcher_delegate.h" |
| +#include "content/shell/common/shell_switches.h" |
|
Avi (use Gerrit)
2015/04/21 20:59:45
You still need to remove this line.
shrike
2015/04/21 21:08:33
There was an existing ../content_switches.h includ
|
| #if defined(OS_WIN) |
| #include "base/files/file_path.h" |
| @@ -269,7 +271,12 @@ void TerminateOnLauncherThread(bool zygote, base::Process process) { |
| void SetProcessBackgroundedOnLauncherThread(base::Process process, |
| bool background) { |
| DCHECK_CURRENTLY_ON(BrowserThread::PROCESS_LAUNCHER); |
| +#if defined(OS_MACOSX) |
| + 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 |