Adapt to new signature of ComponentInstaller::Register()
It expects an additional base::TaskPriority parameter now. Chromium change: https://source.chromium.org/chromium/chromium/src/+/b906784680726a7f56483fbd9b62ec9d0b6fcf1d commit b906784680726a7f56483fbd9b62ec9d0b6fcf1d Author: cfredric <cfredric@chromium.org> Date: Fri Feb 11 20:26:18 2022 +0000 Modify `Register` to optionally take a TaskPriority. Bug: 1283271, 1266014
This commit is contained in:
committed by
Emerick Rogul
parent
3dbdb32df5
commit
ffee90678b
@@ -14,16 +14,18 @@
|
||||
namespace component_updater {
|
||||
|
||||
void ComponentInstaller::Register(ComponentUpdateService* cus,
|
||||
base::OnceClosure callback) {
|
||||
base::OnceClosure callback,
|
||||
base::TaskPriority task_priority) {
|
||||
DCHECK_CALLED_ON_VALID_THREAD(thread_checker_);
|
||||
DCHECK(cus);
|
||||
Register(base::BindOnce(&ComponentUpdateService::RegisterComponent,
|
||||
base::Unretained(cus)),
|
||||
std::move(callback));
|
||||
std::move(callback), task_priority);
|
||||
}
|
||||
|
||||
void ComponentInstaller::Register(RegisterCallback register_callback,
|
||||
base::OnceClosure callback) {
|
||||
base::OnceClosure callback,
|
||||
base::TaskPriority task_priority) {
|
||||
static std::string disallowed_components[] = {
|
||||
"bklopemakmnopmghhmccadeonafabnal", // Legacy TLS Deprecation Config
|
||||
"cmahhnpholdijhjokonmfdjbfmklppij", // Federated Learning of Cohorts
|
||||
@@ -50,7 +52,8 @@ void ComponentInstaller::Register(RegisterCallback register_callback,
|
||||
return;
|
||||
}
|
||||
}
|
||||
Register_ChromiumImpl(std::move(register_callback), std::move(callback));
|
||||
Register_ChromiumImpl(std::move(register_callback), std::move(callback),
|
||||
task_priority);
|
||||
}
|
||||
|
||||
} // namespace component_updater
|
||||
|
||||
@@ -16,9 +16,11 @@
|
||||
// for component_installer.cc, so that we can still compile and link.
|
||||
#define OnUpdateError \
|
||||
Register_ChromiumImpl(ComponentUpdateService* cus, \
|
||||
base::OnceClosure callback); \
|
||||
base::OnceClosure callback, \
|
||||
base::TaskPriority task_priority); \
|
||||
void Register_ChromiumImpl(RegisterCallback register_callback, \
|
||||
base::OnceClosure callback); \
|
||||
base::OnceClosure callback, \
|
||||
base::TaskPriority task_priority); \
|
||||
void OnUpdateError
|
||||
|
||||
#include "src/components/component_updater/component_installer.h"
|
||||
|
||||
Reference in New Issue
Block a user