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

Side by Side Diff: content/browser/child_process_launcher.cc

Issue 420603014: Do not set low priority on background tabs. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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 BrowserThread::PostTask( 513 // TODO(wfh): re-enable this after testing if dropping the priority of
514 BrowserThread::PROCESS_LAUNCHER, FROM_HERE, 514 // backgrounded tabs is the root cause of http://crbug.com/381820.
515 base::Bind( 515 // BrowserThread::PostTask(
516 &ChildProcessLauncher::Context::SetProcessBackgrounded, 516 // BrowserThread::PROCESS_LAUNCHER, FROM_HERE,
517 GetHandle(), background)); 517 // base::Bind(
518 // &ChildProcessLauncher::Context::SetProcessBackgrounded,
519 // GetHandle(), background));
518 } 520 }
519 521
520 void ChildProcessLauncher::SetTerminateChildOnShutdown( 522 void ChildProcessLauncher::SetTerminateChildOnShutdown(
521 bool terminate_on_shutdown) { 523 bool terminate_on_shutdown) {
522 if (context_.get()) 524 if (context_.get())
523 context_->set_terminate_child_on_shutdown(terminate_on_shutdown); 525 context_->set_terminate_child_on_shutdown(terminate_on_shutdown);
524 } 526 }
525 527
526 } // namespace content 528 } // 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