| Index: content/child/child_thread_impl.cc
|
| diff --git a/content/child/child_thread_impl.cc b/content/child/child_thread_impl.cc
|
| index e720fa4869dd600377d2ae6cee0305923cd7f05b..8f0d93c67c36a9dbc2261ee635b734c0143e15ea 100644
|
| --- a/content/child/child_thread_impl.cc
|
| +++ b/content/child/child_thread_impl.cc
|
| @@ -660,6 +660,14 @@ bool ChildThreadImpl::OnControlMessageReceived(const IPC::Message& msg) {
|
| return false;
|
| }
|
|
|
| +void ChildThreadImpl::OnProcessBackgrounded(bool backgrounded) {
|
| + // 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();
|
| }
|
| @@ -738,12 +746,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
|
|
|