Chromium Code Reviews| Index: content/browser/renderer_host/render_process_host_impl.cc |
| diff --git a/content/browser/renderer_host/render_process_host_impl.cc b/content/browser/renderer_host/render_process_host_impl.cc |
| index 1e20d8e6a899b551bc85a4362a7507ebdfb8bf39..82f1c5a73e85da7b5a9c9ef32b5390cba1a4aeb3 100644 |
| --- a/content/browser/renderer_host/render_process_host_impl.cc |
| +++ b/content/browser/renderer_host/render_process_host_impl.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. |
| @@ -2246,12 +2246,21 @@ void RenderProcessHostImpl::SetBackgrounded(bool backgrounded) { |
| #if defined(OS_WIN) |
| // Same as below, but bound to an experiment (http://crbug.com/458594) |
| - // initially on Windows. Enabled by default in the asbence of field trials to |
| + // initially on Windows. Enabled by default in the absence of field trials to |
| // get coverage on the perf waterfall. |
| base::FieldTrial* trial = |
| base::FieldTrialList::Find("BackgroundRendererProcesses"); |
| if (!trial || trial->group_name() != "Disallow") |
| child_process_launcher_->SetProcessBackgrounded(backgrounded); |
| +#elif defined(OS_MACOSX) |
| + // Same as below, but bound to an experiment (http://crbug.com/458594) . |
| + // Disabled by default (perf waterfall coverage will come through a new |
| + // telemetry benchmark). |
| + const std::string trial_group_name = |
| + base::FieldTrialList::FindFullName("BackgroundRendererProcesses"); |
| + if (!trial_group_name.empty() && trial_group_name != "Disallow") { |
|
Alexei Svitkine (slow)
2015/04/23 20:53:28
This pattern makes it impossible to have a Control
|
| + child_process_launcher_->SetProcessBackgrounded(backgrounded); |
| + } |
| #else |
| // Control the background state from the browser process, otherwise the task |
| // telling the renderer to "unbackground" itself may be preempted by other |