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

Side by Side Diff: components/task_scheduler_util/browser/initialization.h

Issue 2749303002: [reference - do not submit] Always create four pools in TaskSchedulerImpl. (Closed)
Patch Set: rebase Created 3 years, 9 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 unified diff | Download patch
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 #ifndef COMPONENTS_TASK_SCHEDULER_UTIL_BROWSER_INITIALIZATION_H_ 5 #ifndef COMPONENTS_TASK_SCHEDULER_UTIL_BROWSER_INITIALIZATION_H_
6 #define COMPONENTS_TASK_SCHEDULER_UTIL_BROWSER_INITIALIZATION_H_ 6 #define COMPONENTS_TASK_SCHEDULER_UTIL_BROWSER_INITIALIZATION_H_
7 7
8 #include <stddef.h> 8 #include <memory>
9 9
10 #include <vector> 10 #include "base/task_scheduler/task_scheduler.h"
11
12 #include "base/task_scheduler/scheduler_worker_pool_params.h"
13
14 namespace base {
15 class TaskTraits;
16 }
17 11
18 namespace task_scheduler_util { 12 namespace task_scheduler_util {
19 13
20 // Gets a vector of SchedulerWorkerPoolParams to initialize TaskScheduler in the 14 // Gets a TaskSchedulerInitParams object to initialize TaskScheduler in the
21 // browser based off variations. Returns an empty vector on failure. 15 // browser based off variations. Returns nullptr on failure.
22 std::vector<base::SchedulerWorkerPoolParams> 16 std::unique_ptr<base::TaskSchedulerInitParams>
23 GetBrowserWorkerPoolParamsFromVariations(); 17 GetBrowserTaskSchedulerInitParamsFromVariations();
24
25 // Maps |traits| to the index of a browser worker pool vector provided by
26 // GetBrowserWorkerPoolParamsFromVariations().
27 size_t BrowserWorkerPoolIndexForTraits(const base::TaskTraits& traits);
28 18
29 // Redirects zero-to-many PostTask APIs to the browser task scheduler based off 19 // Redirects zero-to-many PostTask APIs to the browser task scheduler based off
30 // variations. 20 // variations.
31 void MaybePerformBrowserTaskSchedulerRedirection(); 21 void MaybePerformBrowserTaskSchedulerRedirection();
32 22
33 } // namespace task_scheduler_util 23 } // namespace task_scheduler_util
34 24
35 #endif // COMPONENTS_TASK_SCHEDULER_UTIL_BROWSER_INITIALIZATION_H_ 25 #endif // COMPONENTS_TASK_SCHEDULER_UTIL_BROWSER_INITIALIZATION_H_
OLDNEW
« no previous file with comments | « chrome/renderer/chrome_content_renderer_client.cc ('k') | components/task_scheduler_util/browser/initialization.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698