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

Side by Side 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 unified diff | Download patch
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 "chrome/browser/task_manager/sampling/task_group_sampler.h" 5 #include "chrome/browser/task_manager/sampling/task_group_sampler.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/callback.h" 10 #include "base/callback.h"
(...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after
174 #if defined(OS_LINUX) 174 #if defined(OS_LINUX)
175 int TaskGroupSampler::RefreshOpenFdCount() { 175 int TaskGroupSampler::RefreshOpenFdCount() {
176 DCHECK(worker_pool_sequenced_checker_.CalledOnValidSequence()); 176 DCHECK(worker_pool_sequenced_checker_.CalledOnValidSequence());
177 177
178 return process_metrics_->GetOpenFdCount(); 178 return process_metrics_->GetOpenFdCount();
179 } 179 }
180 #endif // defined(OS_LINUX) 180 #endif // defined(OS_LINUX)
181 181
182 bool TaskGroupSampler::RefreshProcessPriority() { 182 bool TaskGroupSampler::RefreshProcessPriority() {
183 DCHECK(worker_pool_sequenced_checker_.CalledOnValidSequence()); 183 DCHECK(worker_pool_sequenced_checker_.CalledOnValidSequence());
184 184 #if defined(OS_MACOSX)
185 return process_.IsProcessBackgrounded(
186 content::BrowserChildProcessHost::GetPortProvider());
187 #else
185 return process_.IsProcessBackgrounded(); 188 return process_.IsProcessBackgrounded();
189 #endif // defined(OS_MACOSX)
186 } 190 }
187 191
188 } // namespace task_manager 192 } // namespace task_manager
OLDNEW
« 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