#include "survey_config.h"
#include <optional>
#include "base/feature_list.h"
#include "base/features.h"
#include "chrome/common/chrome_features.h"
#include "components/autofill/core/common/autofill_features.h"
#include "components/permissions/features.h"
#include "components/permissions/permission_hats_trigger_helper.h"
#include "components/privacy_sandbox/privacy_sandbox_features.h"
#if !BUILDFLAG(IS_ANDROID)
#include "chrome/browser/download/download_warning_desktop_hats_utils.h"
#include "components/password_manager/core/browser/features/password_features.h"
#include "components/performance_manager/public/features.h"
#include "components/permissions/constants.h"
#include "components/safe_browsing/core/common/features.h"
#include "components/safe_browsing/core/common/safebrowsing_constants.h"
#else
#include "chrome/browser/flags/android/chrome_feature_list.h"
#endif
#if !BUILDFLAG(IS_ANDROID)
constexpr char kHatsSurveyTriggerAutofillAddress[] = …;
constexpr char kHatsSurveyTriggerAutofillAddressUserPerception[] = …;
constexpr char kHatsSurveyTriggerAutofillCreditCardUserPerception[] = …;
constexpr char kHatsSurveyTriggerAutofillPasswordUserPerception[] = …;
constexpr char kHatsSurveyTriggerAutofillCard[] = …;
constexpr char kHatsSurveyTriggerAutofillPassword[] = …;
constexpr char kHatsSurveyTriggerDownloadWarningBubbleBypass[] = …;
constexpr char kHatsSurveyTriggerDownloadWarningBubbleHeed[] = …;
constexpr char kHatsSurveyTriggerDownloadWarningBubbleIgnore[] = …;
constexpr char kHatsSurveyTriggerDownloadWarningPageBypass[] = …;
constexpr char kHatsSurveyTriggerDownloadWarningPageHeed[] = …;
constexpr char kHatsSurveyTriggerDownloadWarningPageIgnore[] = …;
#if BUILDFLAG(GOOGLE_CHROME_BRANDING)
constexpr char kHatsSurveyTriggerGetMostChrome[] = "get-most-chrome";
#endif
constexpr char kHatsSurveyTriggerM1AdPrivacyPage[] = …;
constexpr char kHatsSurveyTriggerM1TopicsSubpage[] = …;
constexpr char kHatsSurveyTriggerM1FledgeSubpage[] = …;
constexpr char kHatsSurveyTriggerM1AdMeasurementSubpage[] = …;
constexpr char kHatsSurveyTriggerNtpModules[] = …;
constexpr char kHatsSurveyTriggerNtpPhotosModuleOptOut[] = …;
constexpr char kHatsSurveyTriggerPerformanceControlsPerformance[] = …;
constexpr char kHatsSurveyTriggerPerformanceControlsBatteryPerformance[] = …;
constexpr char kHatsSurveyTriggerPerformanceControlsMemorySaverOptOut[] = …;
constexpr char kHatsSurveyTriggerPerformanceControlsBatterySaverOptOut[] = …;
constexpr char kHatsSurveyTriggerPrivacyGuide[] = …;
constexpr char kHatsSurveyTriggerRedWarning[] = …;
constexpr char kHatsSurveyTriggerSettings[] = …;
constexpr char kHatsSurveyTriggerSettingsPrivacy[] = …;
constexpr char kHatsSurveyTriggerSettingsSecurity[] = …;
constexpr char kHatsSurveyTriggerSuggestedPasswordsExperiment[] = …;
constexpr char kHatsSurveyTriggerTrustSafetyPrivacySandbox4ConsentAccept[] = …;
constexpr char kHatsSurveyTriggerTrustSafetyPrivacySandbox4ConsentDecline[] = …;
constexpr char kHatsSurveyTriggerTrustSafetyPrivacySandbox4NoticeOk[] = …;
constexpr char kHatsSurveyTriggerTrustSafetyPrivacySandbox4NoticeSettings[] = …;
constexpr char kHatsSurveyTriggerTrustSafetyPrivacySettings[] = …;
constexpr char kHatsSurveyTriggerTrustSafetyTrustedSurface[] = …;
constexpr char kHatsSurveyTriggerTrustSafetyTransactions[] = …;
constexpr char kHatsSurveyTriggerWhatsNew[] = …;
constexpr char kHatsSurveyTriggerWhatsNewAlternate[] = …;
constexpr char kHatsSurveyTriggerTrustSafetyV2BrowsingData[] = …;
constexpr char kHatsSurveyTriggerTrustSafetyV2ControlGroup[] = …;
constexpr char kHatsSurveyTriggerTrustSafetyV2DownloadWarningUI[] = …;
constexpr char kHatsSurveyTriggerTrustSafetyV2PasswordCheck[] = …;
constexpr char kHatsSurveyTriggerTrustSafetyV2PasswordProtectionUI[] = …;
constexpr char kHatsSurveyTriggerTrustSafetyV2SafetyCheck[] = …;
constexpr char kHatsSurveyTriggerTrustSafetyV2SafetyHubNotification[] = …;
constexpr char kHatsSurveyTriggerTrustSafetyV2SafetyHubInteraction[] = …;
constexpr char kHatsSurveyTriggerTrustSafetyV2TrustedSurface[] = …;
constexpr char kHatsSurveyTriggerTrustSafetyV2PrivacyGuide[] = …;
constexpr char kHatsSurveyTriggerTrustSafetyV2PrivacySandbox4ConsentAccept[] = …;
constexpr char kHatsSurveyTriggerTrustSafetyV2PrivacySandbox4ConsentDecline[] = …;
constexpr char kHatsSurveyTriggerTrustSafetyV2PrivacySandbox4NoticeOk[] = …;
constexpr char kHatsSurveyTriggerTrustSafetyV2PrivacySandbox4NoticeSettings[] = …;
constexpr char kHatsSurveyTriggerTrustSafetyV2SafeBrowsingInterstitial[] = …;
constexpr char kHatsSurveyTriggerWallpaperSearch[] = …;
#else
constexpr char kHatsSurveyTriggerAndroidStartupSurvey[] = "startup_survey";
constexpr char kHatsSurveyTriggerQuickDelete[] = "quick_delete_survey";
constexpr char kHatsSurveyTriggerSafetyHubAndroid[] =
"safety_hub_android_survey";
#endif
constexpr char kHatsSurveyTriggerTesting[] = …;
constexpr char kHatsNextSurveyTriggerIDTesting[] = …;
constexpr char kHatsSurveyTriggerPermissionsPrompt[] = …;
constexpr char kHatsSurveyTriggerPrivacySandboxSentimentSurvey[] = …;
namespace {
constexpr char kHatsSurveyProbability[] = …;
constexpr char kHatsSurveyEnSiteID[] = …;
constexpr char kHatsSurveyHistogramName[] = …;
constexpr double kHatsSurveyProbabilityDefault = …;
std::vector<hats::SurveyConfig> GetAllSurveyConfigs() { … }
}
namespace hats {
SurveyConfig::SurveyConfig() = default;
SurveyConfig::SurveyConfig(const SurveyConfig&) = default;
SurveyConfig::~SurveyConfig() = default;
SurveyConfig::SurveyConfig(
const base::Feature* feature,
const std::string& trigger,
const std::optional<std::string>& presupplied_trigger_id,
const std::vector<std::string>& product_specific_bits_data_fields,
const std::vector<std::string>& product_specific_string_data_fields,
bool log_responses_to_uma)
: … { … }
void GetActiveSurveyConfigs(SurveyConfigs& survey_configs_by_triggers_) { … }
}