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

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

Issue 2539263003: Move Task Scheduler Initialization From chrome/browser to Content (Closed)
Patch Set: Rebase to bf8e2f1 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 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_INITIALIZATION_BROWSER_UTIL_H_ 5 #ifndef COMPONENTS_TASK_SCHEDULER_UTIL_INITIALIZATION_BROWSER_UTIL_H_
6 #define COMPONENTS_TASK_SCHEDULER_UTIL_INITIALIZATION_BROWSER_UTIL_H_ 6 #define COMPONENTS_TASK_SCHEDULER_UTIL_INITIALIZATION_BROWSER_UTIL_H_
7 7
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/task_scheduler/scheduler_worker_pool_params.h" 10 #include "base/task_scheduler/scheduler_worker_pool_params.h"
11 #include "base/time/time.h" 11 #include "base/time/time.h"
12 #include "build/build_config.h"
12 13
13 namespace base { 14 namespace base {
14 class TaskTraits; 15 class TaskTraits;
15 } 16 }
16 17
17 namespace task_scheduler_util { 18 namespace task_scheduler_util {
18 namespace initialization { 19 namespace initialization {
19 20
20 enum WorkerPoolType : size_t { 21 enum WorkerPoolType : size_t {
21 BACKGROUND = 0, 22 BACKGROUND = 0,
(...skipping 21 matching lines...) Expand all
43 // initialization. 44 // initialization.
44 std::vector<base::SchedulerWorkerPoolParams> 45 std::vector<base::SchedulerWorkerPoolParams>
45 BrowserWorkerPoolConfigurationToSchedulerWorkerPoolParams( 46 BrowserWorkerPoolConfigurationToSchedulerWorkerPoolParams(
46 const BrowserWorkerPoolsConfiguration& config); 47 const BrowserWorkerPoolsConfiguration& config);
47 48
48 // Maps |traits| to the index of a browser worker pool vector provided by 49 // Maps |traits| to the index of a browser worker pool vector provided by
49 // BrowserWorkerPoolConfigurationToSchedulerWorkerPoolParams() or 50 // BrowserWorkerPoolConfigurationToSchedulerWorkerPoolParams() or
50 // GetDefaultBrowserSchedulerWorkerPoolParams(). 51 // GetDefaultBrowserSchedulerWorkerPoolParams().
51 size_t BrowserWorkerPoolIndexForTraits(const base::TaskTraits& traits); 52 size_t BrowserWorkerPoolIndexForTraits(const base::TaskTraits& traits);
52 53
54 #if defined(OS_IOS)
53 // Returns the default browser scheduler worker pool params. 55 // Returns the default browser scheduler worker pool params.
54 std::vector<base::SchedulerWorkerPoolParams> 56 std::vector<base::SchedulerWorkerPoolParams>
55 GetDefaultBrowserSchedulerWorkerPoolParams(); 57 GetDefaultBrowserSchedulerWorkerPoolParams();
58 #endif // defined(OS_IOS)
56 59
57 } // namespace initialization 60 } // namespace initialization
58 } // namespace task_scheduler_util 61 } // namespace task_scheduler_util
59 62
60 #endif // COMPONENTS_TASK_SCHEDULER_UTIL_INITIALIZATION_BROWSER_UTIL_H_ 63 #endif // COMPONENTS_TASK_SCHEDULER_UTIL_INITIALIZATION_BROWSER_UTIL_H_
OLDNEW
« no previous file with comments | « chrome/browser/chrome_content_browser_client.cc ('k') | components/task_scheduler_util/initialization/browser_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698