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

Unified Diff: components/task_scheduler_util/variations/browser_variations_util.cc

Issue 2574403002: Add a TaskPriority cap to the SWP redirection to experiment with no redirections at USER_BLOCKING. (Closed)
Patch Set: Created 4 years 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: components/task_scheduler_util/variations/browser_variations_util.cc
diff --git a/components/task_scheduler_util/variations/browser_variations_util.cc b/components/task_scheduler_util/variations/browser_variations_util.cc
index a3616b10bc492b21eaf76d5df8a26035f9e7a12f..29f2e32f8a4bfc3be5bc2ac48abb02ec1399daa3 100644
--- a/components/task_scheduler_util/variations/browser_variations_util.cc
+++ b/components/task_scheduler_util/variations/browser_variations_util.cc
@@ -136,7 +136,20 @@ void MaybePerformBrowserTaskSchedulerRedirection() {
switches::kDisableBrowserTaskScheduler) &&
sequenced_worker_pool_param != variation_params.end() &&
sequenced_worker_pool_param->second == "true") {
- base::SequencedWorkerPool::EnableWithRedirectionToTaskSchedulerForProcess();
+ // Check a variation that allows capping all redirections at USER_VISIBLE
+ // (no USER_BLOCKING) to observe the side-effects of multiple priority
+ // levels in the foreground IO pool.
+ const auto sequenced_worker_pool_cap_priority_param =
+ variation_params.find("CapSequencedWorkerPoolsAtUserVisible");
+
+ const base::TaskPriority max_task_priority =
+ sequenced_worker_pool_cap_priority_param != variation_params.end() &&
+ sequenced_worker_pool_cap_priority_param->second == "true"
+ ? base::TaskPriority::USER_VISIBLE
+ : base::TaskPriority::HIGHEST;
+
+ base::SequencedWorkerPool::EnableWithRedirectionToTaskSchedulerForProcess(
+ max_task_priority);
} else {
base::SequencedWorkerPool::EnableForProcess();
}
« base/threading/sequenced_worker_pool.cc ('K') | « base/threading/sequenced_worker_pool.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698