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

Unified Diff: components/task_scheduler_util/renderer/initialization.cc

Issue 2799453002: Remove deprecated functions from components/task_scheduler_util/. (Closed)
Patch Set: Created 3 years, 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « components/task_scheduler_util/renderer/initialization.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/task_scheduler_util/renderer/initialization.cc
diff --git a/components/task_scheduler_util/renderer/initialization.cc b/components/task_scheduler_util/renderer/initialization.cc
index b3cb3ffb4c370e0a3ea9a4740ed4e0dc44330b13..854bfe0d334555f6a3484f1ce7dbdd3eae448ec1 100644
--- a/components/task_scheduler_util/renderer/initialization.cc
+++ b/components/task_scheduler_util/renderer/initialization.cc
@@ -5,23 +5,10 @@
#include "components/task_scheduler_util/renderer/initialization.h"
#include "base/command_line.h"
-#include "base/task_scheduler/task_traits.h"
#include "components/task_scheduler_util/common/variations_util.h"
namespace task_scheduler_util {
-namespace {
-
-enum WorkerPoolType : size_t {
- BACKGROUND = 0,
- BACKGROUND_BLOCKING,
- FOREGROUND,
- FOREGROUND_BLOCKING,
- WORKER_POOL_COUNT // Always last.
-};
-
-} // namespace
-
std::unique_ptr<base::TaskScheduler::InitParams>
GetRendererTaskSchedulerInitParamsFromCommandLine() {
return GetTaskSchedulerInitParams(
@@ -29,24 +16,4 @@ GetRendererTaskSchedulerInitParamsFromCommandLine() {
*base::CommandLine::ForCurrentProcess()));
}
-std::vector<base::SchedulerWorkerPoolParams> GetRendererWorkerPoolParams() {
- const auto init_params = GetRendererTaskSchedulerInitParamsFromCommandLine();
- if (!init_params)
- return std::vector<base::SchedulerWorkerPoolParams>();
-
- return std::vector<base::SchedulerWorkerPoolParams>{
- init_params->background_worker_pool_params,
- init_params->background_blocking_worker_pool_params,
- init_params->foreground_worker_pool_params,
- init_params->foreground_blocking_worker_pool_params};
-}
-
-size_t RendererWorkerPoolIndexForTraits(const base::TaskTraits& traits) {
- const bool is_background =
- traits.priority() == base::TaskPriority::BACKGROUND;
- if (traits.may_block() || traits.with_base_sync_primitives())
- return is_background ? BACKGROUND_BLOCKING : FOREGROUND_BLOCKING;
- return is_background ? BACKGROUND : FOREGROUND;
-}
-
} // namespace task_scheduler_util
« no previous file with comments | « components/task_scheduler_util/renderer/initialization.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698