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

Side by Side Diff: content/browser/child_process_launcher.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 | « no previous file | content/browser/renderer_host/render_process_host_impl.cc » ('j') | 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/browser/child_process_launcher.h" 5 #include "content/browser/child_process_launcher.h"
6 6
7 #include <utility> // For std::pair. 7 #include <utility> // For std::pair.
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 492 matching lines...) Expand 10 before | Expand all | Expand 10 after
503 // it'll reap the process. However, if GetTerminationStatus didn't 503 // it'll reap the process. However, if GetTerminationStatus didn't
504 // reap the child (because it was still running), we'll need to 504 // reap the child (because it was still running), we'll need to
505 // Terminate via ProcessWatcher. So we can't close the handle here. 505 // Terminate via ProcessWatcher. So we can't close the handle here.
506 if (context_->termination_status_ != base::TERMINATION_STATUS_STILL_RUNNING) 506 if (context_->termination_status_ != base::TERMINATION_STATUS_STILL_RUNNING)
507 context_->process_.Close(); 507 context_->process_.Close();
508 508
509 return context_->termination_status_; 509 return context_->termination_status_;
510 } 510 }
511 511
512 void ChildProcessLauncher::SetProcessBackgrounded(bool background) { 512 void ChildProcessLauncher::SetProcessBackgrounded(bool background) {
513 // TODO(wfh): re-enable this after testing if dropping the priority of 513 BrowserThread::PostTask(
514 // backgrounded tabs is the root cause of http://crbug.com/381820. 514 BrowserThread::PROCESS_LAUNCHER, FROM_HERE,
515 // BrowserThread::PostTask( 515 base::Bind(
516 // BrowserThread::PROCESS_LAUNCHER, FROM_HERE, 516 &ChildProcessLauncher::Context::SetProcessBackgrounded,
517 // base::Bind( 517 GetHandle(), background));
518 // &ChildProcessLauncher::Context::SetProcessBackgrounded,
519 // GetHandle(), background));
520 } 518 }
521 519
522 void ChildProcessLauncher::SetTerminateChildOnShutdown( 520 void ChildProcessLauncher::SetTerminateChildOnShutdown(
523 bool terminate_on_shutdown) { 521 bool terminate_on_shutdown) {
524 if (context_.get()) 522 if (context_.get())
525 context_->set_terminate_child_on_shutdown(terminate_on_shutdown); 523 context_->set_terminate_child_on_shutdown(terminate_on_shutdown);
526 } 524 }
527 525
528 } // namespace content 526 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | content/browser/renderer_host/render_process_host_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698