OLD | NEW |
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 // TODO(fdoray): Remove this file once TaskScheduler initialization in the |
| 6 // browser process uses the components/task_scheduler_util/browser/ API on all |
| 7 // platforms. |
| 8 |
5 #include "components/task_scheduler_util/variations/browser_variations_util.h" | 9 #include "components/task_scheduler_util/variations/browser_variations_util.h" |
6 | 10 |
7 #include <map> | 11 #include <map> |
8 #include <vector> | 12 #include <vector> |
9 | 13 |
10 #include "base/metrics/field_trial.h" | 14 #include "base/metrics/field_trial.h" |
| 15 #include "base/task_scheduler/scheduler_worker_pool_params.h" |
11 #include "components/variations/variations_associated_data.h" | 16 #include "components/variations/variations_associated_data.h" |
12 #include "testing/gtest/include/gtest/gtest.h" | 17 #include "testing/gtest/include/gtest/gtest.h" |
13 | 18 |
14 namespace task_scheduler_util { | 19 namespace task_scheduler_util { |
15 namespace variations { | 20 namespace variations { |
16 | 21 |
17 namespace { | 22 namespace { |
18 | 23 |
19 using StandbyThreadPolicy = | 24 using StandbyThreadPolicy = |
20 base::SchedulerWorkerPoolParams::StandbyThreadPolicy; | 25 base::SchedulerWorkerPoolParams::StandbyThreadPolicy; |
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
141 base::FieldTrialList::CreateFieldTrial(kFieldTrialName, kFieldTrialTestGroup); | 146 base::FieldTrialList::CreateFieldTrial(kFieldTrialName, kFieldTrialTestGroup); |
142 ASSERT_TRUE(::variations::AssociateVariationParams(kFieldTrialName, | 147 ASSERT_TRUE(::variations::AssociateVariationParams(kFieldTrialName, |
143 kFieldTrialTestGroup, | 148 kFieldTrialTestGroup, |
144 params)); | 149 params)); |
145 auto params_vector = GetBrowserSchedulerWorkerPoolParamsFromVariations(); | 150 auto params_vector = GetBrowserSchedulerWorkerPoolParamsFromVariations(); |
146 EXPECT_TRUE(params_vector.empty()); | 151 EXPECT_TRUE(params_vector.empty()); |
147 } | 152 } |
148 | 153 |
149 } // namespace variations | 154 } // namespace variations |
150 } // namespace task_scheduler_util | 155 } // namespace task_scheduler_util |
OLD | NEW |