Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(181)

Side by Side Diff: content/child/child_thread.cc

Issue 421373002: Do not set background priority in-process on Windows (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: do not set priority from within child process Created 6 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « content/browser/renderer_host/render_process_host_impl.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "content/child/child_thread.h" 5 #include "content/child/child_thread.h"
6 6
7 #include <signal.h> 7 #include <signal.h>
8 8
9 #include <string> 9 #include <string>
10 10
(...skipping 549 matching lines...) Expand 10 before | Expand all | Expand 10 after
560 void ChildThread::OnProcessBackgrounded(bool background) { 560 void ChildThread::OnProcessBackgrounded(bool background) {
561 // Set timer slack to maximum on main thread when in background. 561 // Set timer slack to maximum on main thread when in background.
562 base::TimerSlack timer_slack = base::TIMER_SLACK_NONE; 562 base::TimerSlack timer_slack = base::TIMER_SLACK_NONE;
563 if (background) 563 if (background)
564 timer_slack = base::TIMER_SLACK_MAXIMUM; 564 timer_slack = base::TIMER_SLACK_MAXIMUM;
565 base::MessageLoop::current()->SetTimerSlack(timer_slack); 565 base::MessageLoop::current()->SetTimerSlack(timer_slack);
566 566
567 #ifdef OS_WIN 567 #ifdef OS_WIN
568 // Windows Vista+ has a fancy process backgrounding mode that can only be set 568 // Windows Vista+ has a fancy process backgrounding mode that can only be set
569 // from within the process. 569 // from within the process.
570 base::Process::Current().SetProcessBackgrounded(background); 570 // TODO(wfh) Do not set background from within process until the issue with
571 // white tabs is resolved. See http://crbug.com/398103.
572 // base::Process::Current().SetProcessBackgrounded(background);
571 #endif // OS_WIN 573 #endif // OS_WIN
572 } 574 }
573 575
574 } // namespace content 576 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/renderer_host/render_process_host_impl.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698