model_enums.h 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. // Copyright 2021 The Chromium Authors. All rights reserved.
  2. // Use of this source code is governed by a BSD-style license that can be
  3. // found in the LICENSE file.
  4. #ifndef COMPONENTS_OPTIMIZATION_GUIDE_CORE_MODEL_ENUMS_H_
  5. #define COMPONENTS_OPTIMIZATION_GUIDE_CORE_MODEL_ENUMS_H_
  6. namespace optimization_guide {
  7. // The types of decisions that can be made for an optimization target.
  8. //
  9. // Keep in sync with OptimizationGuideOptimizationTargetDecision in enums.xml.
  10. enum class OptimizationTargetDecision {
  11. kUnknown = 0,
  12. // The page load does not match the optimization target.
  13. kPageLoadDoesNotMatch = 1,
  14. // The page load matches the optimization target.
  15. kPageLoadMatches = 2,
  16. // The model needed to make the target decision was not available on the
  17. // client.
  18. kModelNotAvailableOnClient = 3,
  19. // The page load is part of a model prediction holdback where all decisions
  20. // will return |OptimizationGuideDecision::kFalse| in an attempt to not taint
  21. // the data for understanding the production recall of the model.
  22. kModelPredictionHoldback = 4,
  23. // The OptimizationGuideDecider was not initialized yet.
  24. kDeciderNotInitialized = 5,
  25. // Add new values above this line.
  26. kMaxValue = kDeciderNotInitialized,
  27. };
  28. // The statuses for a prediction model in the prediction manager when requested
  29. // to be evaluated.
  30. //
  31. // Keep in sync with OptimizationGuidePredictionManagerModelStatus in enums.xml.
  32. enum class PredictionManagerModelStatus {
  33. kUnknown = 0,
  34. // The model is loaded and available for use.
  35. kModelAvailable = 1,
  36. // The store is initialized but does not contain a model for the optimization
  37. // target.
  38. kStoreAvailableNoModelForTarget = 2,
  39. // The store is initialized and contains a model for the optimization target
  40. // but it is not loaded in memory.
  41. kStoreAvailableModelNotLoaded = 3,
  42. // The store is not initialized and it is unknown if it contains a model for
  43. // the optimization target.
  44. kStoreUnavailableModelUnknown = 4,
  45. // Add new values above this line.
  46. kMaxValue = kStoreUnavailableModelUnknown,
  47. };
  48. } // namespace optimization_guide
  49. #endif // COMPONENTS_OPTIMIZATION_GUIDE_CORE_OPTIMIZATION_GUIDE_ENUMS_H_