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

Unified Diff: chrome/browser/task_manager/sampling/task_group_sampler.cc

Issue 2454073003: Allow backgrounding processes on Mac (Closed)
Patch Set: Address review comments Created 4 years, 1 month 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/task_manager/sampling/task_group_sampler.cc
diff --git a/chrome/browser/task_manager/sampling/task_group_sampler.cc b/chrome/browser/task_manager/sampling/task_group_sampler.cc
index cb32eaee894bad690bf95018e6fc2751e42a8992..9cf7872049e0c03b79a91670b51dbab995f02a59 100644
--- a/chrome/browser/task_manager/sampling/task_group_sampler.cc
+++ b/chrome/browser/task_manager/sampling/task_group_sampler.cc
@@ -181,8 +181,12 @@ int TaskGroupSampler::RefreshOpenFdCount() {
bool TaskGroupSampler::RefreshProcessPriority() {
DCHECK(worker_pool_sequenced_checker_.CalledOnValidSequence());
-
+#if defined(OS_MACOSX)
+ return process_.IsProcessBackgrounded(
+ content::BrowserChildProcessHost::GetPortProvider());
+#else
return process_.IsProcessBackgrounded();
+#endif // defined(OS_MACOSX)
}
} // namespace task_manager
« no previous file with comments | « chrome/browser/renderer_host/render_process_host_chrome_browsertest.cc ('k') | content/browser/child_process_launcher.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698