summaryrefslogtreecommitdiff
path: root/chromium/components/task_scheduler_util/browser/initialization.h
blob: 46ad21860f2e54c32843e6edbf57fd76a1f5cfdb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
// Copyright 2016 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifndef COMPONENTS_TASK_SCHEDULER_UTIL_BROWSER_INITIALIZATION_H_
#define COMPONENTS_TASK_SCHEDULER_UTIL_BROWSER_INITIALIZATION_H_

#include <memory>

#include "base/task_scheduler/task_scheduler.h"

namespace task_scheduler_util {

// Gets a TaskScheduler::InitParams object to initialize TaskScheduler in the
// browser based off variations. Returns nullptr on failure.
std::unique_ptr<base::TaskScheduler::InitParams>
GetBrowserTaskSchedulerInitParamsFromVariations();

// Redirects zero-to-many PostTask APIs to the browser task scheduler based off
// variations.
void MaybePerformBrowserTaskSchedulerRedirection();

}  // namespace task_scheduler_util

#endif  // COMPONENTS_TASK_SCHEDULER_UTIL_BROWSER_INITIALIZATION_H_