features.h 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  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_ACCURACY_TIPS_FEATURES_H_
  5. #define COMPONENTS_ACCURACY_TIPS_FEATURES_H_
  6. #include "base/metrics/field_trial_params.h"
  7. #include "base/time/time.h"
  8. namespace accuracy_tips {
  9. namespace features {
  10. // Additional parameters for safe_browsing::kAccuracyTipsFeature.
  11. // URL that triggers an AccuracyTip for testing purposes.
  12. extern const base::FeatureParam<std::string> kSampleUrl;
  13. // Disables the UI but still queries SB and records metrics. Used for
  14. // dark-launch and to create a control group.
  15. extern const base::FeatureParam<bool> kDisableUi;
  16. // URL that the "Learn more" button links to.
  17. extern const base::FeatureParam<std::string> kLearnMoreUrl;
  18. // Amount of time that has to pass between two accuracy prompts.
  19. extern const base::FeatureParam<base::TimeDelta> kTimeBetweenPrompts;
  20. // Number of prompts that are shown with an "ignore" button instead of an
  21. // opt-out.
  22. extern const base::FeatureParam<int> kNumIgnorePrompts;
  23. // Amount of site-enagegement score that would suppress an accuracy tip.
  24. extern const base::FeatureParam<int> kMaxSiteEngagementScore;
  25. // Controls whether accuracy tips survey should be enabled.
  26. extern const base::Feature kAccuracyTipsSurveyFeature;
  27. // A minimal amount of time that has to pass after showing accuracy tip before
  28. // trying to show a survey.
  29. extern const base::FeatureParam<base::TimeDelta> kMinTimeToShowSurvey;
  30. // A maximal amount of time, that passed after showing accuracy tip, during
  31. // which we can show a survey.
  32. extern const base::FeatureParam<base::TimeDelta> kMaxTimeToShowSurvey;
  33. // A minimal count of accuracy tips shown, after which survey might be shown.
  34. extern const base::FeatureParam<int> kMinPromptCountRequiredForSurvey;
  35. } // namespace features
  36. } // namespace accuracy_tips
  37. #endif // COMPONENTS_ACCURACY_TIPS_FEATURES_H_