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

Side by Side Diff: base/task_scheduler/scheduler_worker_pool_params.cc

Issue 2764603002: Add TaskScheduler::InitParams and accept it in TaskSchedulerImpl constructor. (Closed)
Patch Set: self-review 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 #include "base/task_scheduler/scheduler_worker_pool_params.h" 5 #include "base/task_scheduler/scheduler_worker_pool_params.h"
6 6
7 #include "base/strings/string_util.h"
8
7 namespace base { 9 namespace base {
8 10
9 SchedulerWorkerPoolParams::SchedulerWorkerPoolParams( 11 SchedulerWorkerPoolParams::SchedulerWorkerPoolParams(
10 const std::string& name, 12 const std::string& name,
11 ThreadPriority priority_hint, 13 ThreadPriority priority_hint,
12 StandbyThreadPolicy standby_thread_policy, 14 StandbyThreadPolicy standby_thread_policy,
13 int max_threads, 15 int max_threads,
14 TimeDelta suggested_reclaim_time, 16 TimeDelta suggested_reclaim_time,
15 SchedulerBackwardCompatibility backward_compatibility) 17 SchedulerBackwardCompatibility backward_compatibility)
16 : name_(name), 18 : name_(name),
17 priority_hint_(priority_hint), 19 priority_hint_(priority_hint),
18 standby_thread_policy_(standby_thread_policy), 20 standby_thread_policy_(standby_thread_policy),
19 max_threads_(max_threads), 21 max_threads_(max_threads),
20 suggested_reclaim_time_(suggested_reclaim_time), 22 suggested_reclaim_time_(suggested_reclaim_time),
21 backward_compatibility_(backward_compatibility) {} 23 backward_compatibility_(backward_compatibility) {}
22 24
23 SchedulerWorkerPoolParams::SchedulerWorkerPoolParams( 25 SchedulerWorkerPoolParams::SchedulerWorkerPoolParams(
26 StandbyThreadPolicy standby_thread_policy,
27 int max_threads,
28 TimeDelta suggested_reclaim_time,
29 SchedulerBackwardCompatibility backward_compatibility)
30 : SchedulerWorkerPoolParams(EmptyString(),
gab 2017/03/20 20:31:56 s/EmptyString()/std::string()/ (first time I see
fdoray 2017/03/20 20:43:53 Done.
31 ThreadPriority::NORMAL,
32 standby_thread_policy,
33 max_threads,
34 suggested_reclaim_time,
35 backward_compatibility) {}
36
37 SchedulerWorkerPoolParams::SchedulerWorkerPoolParams(
24 const SchedulerWorkerPoolParams& other) = default; 38 const SchedulerWorkerPoolParams& other) = default;
25 39
26 SchedulerWorkerPoolParams& SchedulerWorkerPoolParams::operator=( 40 SchedulerWorkerPoolParams& SchedulerWorkerPoolParams::operator=(
27 const SchedulerWorkerPoolParams& other) = default; 41 const SchedulerWorkerPoolParams& other) = default;
28 42
29 } // namespace base 43 } // namespace base
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698