// Copyright 2020 The Chromium Authors // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #ifndef COMPONENTS_BACKGROUND_TASK_SCHEDULER_TASK_IDS_H_ #define COMPONENTS_BACKGROUND_TASK_SCHEDULER_TASK_IDS_H_ namespace background_task { // This enum lists all the unique task IDs used around in Chromium. These are // listed here to ensure that there is no overlap of task IDs between different // users of the BackgroundTaskScheduler. // When adding your job id to the list below, update: // 1. BackgroundTaskSchedulerExternalUma for metrics, specifically: // toUmaEnumValueFromTaskId() and getHistogramPatternForTaskId(). // 2. Enum BackgroundTaskId in tools/metrics/histograms/enums.xml. // 3. Variant TaskType in // tools/metrics/histograms/metadata/android/histograms.xml. // 4. ChromeBackgroundTaskFactory#createBackgroundTaskFromTaskId in java. // 5. BackgroundTaskSchedulerUmaTest#testToUmaEnumValueFromTaskId for // updated BACKGROUND_TASK_COUNT. // 6. If the task is a native task, also update // ChromeBackgroundTaskFactory::GetNativeBackgroundTaskFromTaskId. // Id from 111000000 to 111999999 are reserved for internal usage. A Java // counterpart will be generated for this enum. // GENERATED_JAVA_ENUM_PACKAGE: ( // org.chromium.components.background_task_scheduler) enum class TaskIds { … }; } // namespace background_task #endif // COMPONENTS_BACKGROUND_TASK_SCHEDULER_TASK_IDS_H_