prediction_request_features.h 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. // Copyright 2020 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_PERMISSIONS_PREDICTION_SERVICE_PREDICTION_REQUEST_FEATURES_H_
  5. #define COMPONENTS_PERMISSIONS_PREDICTION_SERVICE_PREDICTION_REQUEST_FEATURES_H_
  6. #include "components/permissions/permission_request_enums.h"
  7. #include "components/permissions/request_type.h"
  8. namespace permissions {
  9. struct PredictionRequestFeatures {
  10. struct ActionCounts {
  11. size_t grants = 0;
  12. size_t denies = 0;
  13. size_t dismissals = 0;
  14. size_t ignores = 0;
  15. size_t total() const { return grants + denies + dismissals + ignores; }
  16. };
  17. // Whether a gesture is present or not.
  18. PermissionRequestGestureType gesture;
  19. // Which permissions request type this is for.
  20. RequestType type;
  21. // The permission action counts for this specific permission type.
  22. ActionCounts requested_permission_counts;
  23. // The permission action counts for all permissions type.
  24. ActionCounts all_permission_counts;
  25. };
  26. } // namespace permissions
  27. #endif // COMPONENTS_PERMISSIONS_PREDICTION_SERVICE_PREDICTION_REQUEST_FEATURES_H_