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

Unified Diff: components/task_scheduler_util/initialization/browser_util.h

Issue 2565013002: Split browser-specific and generic code in components/task_scheduler_util/. (Closed)
Patch Set: self-review 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/initialization/browser_util.h
diff --git a/components/task_scheduler_util/initialization/browser_util.h b/components/task_scheduler_util/initialization/browser_util.h
index 8d95d8892b1223fe3eb74685adb82284a56f41a5..f0b6e1cf425dab560a2238b442f9bbabb516220d 100644
--- a/components/task_scheduler_util/initialization/browser_util.h
+++ b/components/task_scheduler_util/initialization/browser_util.h
@@ -2,50 +2,25 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
+// TODO(fdoray): Remove this file once TaskScheduler initialization in the
+// browser process uses the components/task_scheduler_util/browser/ API on all
+// platforms.
+
#ifndef COMPONENTS_TASK_SCHEDULER_UTIL_INITIALIZATION_BROWSER_UTIL_H_
#define COMPONENTS_TASK_SCHEDULER_UTIL_INITIALIZATION_BROWSER_UTIL_H_
#include <vector>
-#include "base/task_scheduler/scheduler_worker_pool_params.h"
-#include "base/time/time.h"
#include "build/build_config.h"
namespace base {
+class SchedulerWorkerPoolParams;
class TaskTraits;
}
namespace task_scheduler_util {
namespace initialization {
-enum WorkerPoolType : size_t {
- BACKGROUND = 0,
- BACKGROUND_FILE_IO,
- FOREGROUND,
- FOREGROUND_FILE_IO,
- WORKER_POOL_COUNT // Always last.
-};
-
-struct SingleWorkerPoolConfiguration {
- base::SchedulerWorkerPoolParams::StandbyThreadPolicy standby_thread_policy;
- int threads = 0;
- base::TimeDelta detach_period;
-};
-
-struct BrowserWorkerPoolsConfiguration {
- SingleWorkerPoolConfiguration background;
- SingleWorkerPoolConfiguration background_file_io;
- SingleWorkerPoolConfiguration foreground;
- SingleWorkerPoolConfiguration foreground_file_io;
-};
-
-// Converts a BrowserWorkerPoolsConfiguration to a vector of
-// base::SchedulerWorkerPoolParams for consumption by task scheduler
-// initialization.
-std::vector<base::SchedulerWorkerPoolParams>
-BrowserWorkerPoolConfigurationToSchedulerWorkerPoolParams(
- const BrowserWorkerPoolsConfiguration& config);
-
// Maps |traits| to the index of a browser worker pool vector provided by
// BrowserWorkerPoolConfigurationToSchedulerWorkerPoolParams() or
// GetDefaultBrowserSchedulerWorkerPoolParams().

Powered by Google App Engine
This is Rietveld 408576698