Chromium Code Reviews| Index: chrome/browser/chrome_browser_main.cc |
| diff --git a/chrome/browser/chrome_browser_main.cc b/chrome/browser/chrome_browser_main.cc |
| index ef8d8ccada69f44a348f08479ff86379c8f99f86..14fcc6ea06bce52fdef92173fb41225f06bb596e 100644 |
| --- a/chrome/browser/chrome_browser_main.cc |
| +++ b/chrome/browser/chrome_browser_main.cc |
| @@ -7,7 +7,6 @@ |
| #include <stddef.h> |
| #include <stdint.h> |
| -#include <map> |
| #include <set> |
| #include <string> |
| #include <utility> |
| @@ -34,7 +33,6 @@ |
| #include "base/strings/sys_string_conversions.h" |
| #include "base/strings/utf_string_conversions.h" |
| #include "base/sys_info.h" |
| -#include "base/task_scheduler/switches.h" |
| #include "base/task_scheduler/task_scheduler.h" |
| #include "base/threading/platform_thread.h" |
| #include "base/threading/sequenced_worker_pool.h" |
|
fdoray
2016/11/16 19:23:59
Remove #include "base/threading/sequenced_worker_
robliao
2016/11/16 19:42:55
Done.
|
| @@ -315,31 +313,6 @@ void AddFirstRunNewTabs(StartupBrowserCreator* browser_creator, |
| } |
| #endif // !defined(OS_ANDROID) && !defined(OS_CHROMEOS) |
| -void MaybeInitializeTaskScheduler() { |
| - static constexpr char kFieldTrialName[] = "BrowserScheduler"; |
| - std::map<std::string, std::string> variation_params; |
| - if (!variations::GetVariationParams(kFieldTrialName, &variation_params)) { |
| - DCHECK(!base::CommandLine::ForCurrentProcess()->HasSwitch( |
| - switches::kEnableBrowserTaskScheduler)) |
| - << "The Browser Task Scheduler remains disabled with " |
| - << switches::kEnableBrowserTaskScheduler |
| - << " because there is no available variation param for this build or " |
| - " the task scheduler is disabled in chrome://flags."; |
| - return; |
| - } |
| - |
| - if (!task_scheduler_util::InitializeDefaultTaskScheduler(variation_params)) |
| - return; |
| - |
| - // TODO(gab): Remove this when http://crbug.com/622400 concludes. |
| - const auto sequenced_worker_pool_param = |
| - variation_params.find("RedirectSequencedWorkerPools"); |
| - if (sequenced_worker_pool_param != variation_params.end() && |
| - sequenced_worker_pool_param->second == "true") { |
| - base::SequencedWorkerPool::RedirectToTaskSchedulerForProcess(); |
| - } |
| -} |
| - |
| // Returns the new local state object, guaranteed non-NULL. |
| // |local_state_task_runner| must be a shutdown-blocking task runner. |
| PrefService* InitializeLocalState( |
| @@ -1246,7 +1219,7 @@ int ChromeBrowserMainParts::PreCreateThreadsImpl() { |
| // threads itself so instantiating it earlier is also incorrect. |
| // To maintain scoping symmetry, if this line is moved, the corresponding |
| // shutdown call may also need to be moved. |
| - MaybeInitializeTaskScheduler(); |
| + task_scheduler_util::InitializeDefaultBrowserTaskScheduler(); |
|
fdoray
2016/11/16 19:23:59
Remove "Default"?
robliao
2016/11/16 19:42:55
Technically it is the default one (we provide it),
|
| SetupMetrics(); |