Chromium Code Reviews| Index: content/child/child_thread_impl.cc |
| diff --git a/content/child/child_thread_impl.cc b/content/child/child_thread_impl.cc |
| index 3978af0b74a438b49b1758b62803fa11f0f28ca1..d1766e7c995d4552398dde73423542fb95defc26 100644 |
| --- a/content/child/child_thread_impl.cc |
| +++ b/content/child/child_thread_impl.cc |
| @@ -627,6 +627,14 @@ bool ChildThreadImpl::OnControlMessageReceived(const IPC::Message& msg) { |
| return false; |
| } |
| +void ChildThreadImpl::OnProcessBackgrounded(bool backgrounded) { |
|
Sami
2015/08/28 14:15:01
Nothing changed here -- you just moved this around
jdduke (slow)
2015/08/31 18:36:08
Yep, moved it to preserve ordering as I moved the
|
| + // Set timer slack to maximum on main thread when in background. |
| + base::TimerSlack timer_slack = base::TIMER_SLACK_NONE; |
| + if (backgrounded) |
| + timer_slack = base::TIMER_SLACK_MAXIMUM; |
| + base::MessageLoop::current()->SetTimerSlack(timer_slack); |
| +} |
| + |
| void ChildThreadImpl::OnShutdown() { |
| base::MessageLoop::current()->Quit(); |
| } |
| @@ -705,12 +713,4 @@ bool ChildThreadImpl::IsInBrowserProcess() const { |
| return browser_process_io_runner_; |
| } |
| -void ChildThreadImpl::OnProcessBackgrounded(bool background) { |
| - // Set timer slack to maximum on main thread when in background. |
| - base::TimerSlack timer_slack = base::TIMER_SLACK_NONE; |
| - if (background) |
| - timer_slack = base::TIMER_SLACK_MAXIMUM; |
| - base::MessageLoop::current()->SetTimerSlack(timer_slack); |
| -} |
| - |
| } // namespace content |