// Copyright 2019 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_OPTIMIZATION_GUIDE_CORE_OPTIMIZATION_GUIDE_ENUMS_H_ #define COMPONENTS_OPTIMIZATION_GUIDE_CORE_OPTIMIZATION_GUIDE_ENUMS_H_ namespace optimization_guide { // The types of decisions that can be made for an optimization type. // // Keep in sync with OptimizationGuideOptimizationTypeDecision in enums.xml. enum class OptimizationTypeDecision { … }; // The statuses for racing a hints fetch with the current navigation based // on the availability of hints for both the current host and URL. // // Keep in sync with OptimizationGuideRaceNavigationFetchAttemptStatus in // enums.xml. enum class RaceNavigationFetchAttemptStatus { … }; // The statuses for a download file containing a prediction model when verified // and processed. // // Keep in sync with OptimizationGuidePredictionModelDownloadStatus // in enums.xml. enum class PredictionModelDownloadStatus { … }; // Different events of the prediction model delivery lifecycle for an // OptimizationTarget. // Keep in sync with OptimizationGuideModelDeliveryEvent in enums.xml. enum class ModelDeliveryEvent { … }; // The various model quality user feedback. enum class ModelQualityUserFeedback { … }; // The various results of an access token request. // // Keep in sync with OptimizationGuideAccessTokenResult in enums.xml. enum class OptimizationGuideAccessTokenResult { … }; // Status of a request to fetch from the optimization guide service. // This enum must remain synchronized with the enum // |OptimizationGuideFetcherRequestStatus| in // tools/metrics/histograms/enums.xml. enum class FetcherRequestStatus { … }; // Status of the on-device model. // // These values are persisted to logs. Entries should not be renumbered and // numeric values should never be reused. enum class OnDeviceModelStatus { … }; // Status of a model quality logs upload request. enum class ModelQualityLogsUploadStatus { … }; // Performance class of this device. // // These values are persisted to logs and prefs. Entries should not be // renumbered and numeric values should never be reused. enum class OnDeviceModelPerformanceClass : int { … }; // The result of loading an on-device model. // // These values are persisted to logs. Entries should not be renumbered and // numeric values should never be reused. enum class OnDeviceModelLoadResult { … }; // The validity of the model metadata packaged with the text safety model. // // These values are persisted to logs. Entries should not be renumbered and // numeric values should never be reused. enum class TextSafetyModelMetadataValidity { … }; // Enumerates the different reasons for model remote disconnection. enum class ModelRemoteDisconnectReason { … }; enum class OnDeviceModelAdaptationAvailability { … }; // The result of running validation prompts for the on-device model. // // Keep in sync with OnDeviceModelValidationResult in enums.xml. enum class OnDeviceModelValidationResult { … }; } // namespace optimization_guide #endif // COMPONENTS_OPTIMIZATION_GUIDE_CORE_OPTIMIZATION_GUIDE_ENUMS_H_