diff options
Diffstat (limited to 'chromium/components/autofill/core/browser/autofill_experiments.cc')
-rw-r--r-- | chromium/components/autofill/core/browser/autofill_experiments.cc | 29 |
1 files changed, 25 insertions, 4 deletions
diff --git a/chromium/components/autofill/core/browser/autofill_experiments.cc b/chromium/components/autofill/core/browser/autofill_experiments.cc index ef37213e57a..e667d896369 100644 --- a/chromium/components/autofill/core/browser/autofill_experiments.cc +++ b/chromium/components/autofill/core/browser/autofill_experiments.cc @@ -11,6 +11,7 @@ #include "base/strings/string_number_conversions.h" #include "base/strings/string_util.h" #include "base/strings/utf_string_conversions.h" +#include "base/time/time.h" #include "build/build_config.h" #include "components/autofill/core/browser/suggestion.h" #include "components/autofill/core/common/autofill_pref_names.h" @@ -32,10 +33,17 @@ const base::Feature kAutofillCreditCardPopupLayout{ "AutofillCreditCardPopupLayout", base::FEATURE_DISABLED_BY_DEFAULT}; const base::Feature kAutofillCreditCardLastUsedDateDisplay{ "AutofillCreditCardLastUsedDateDisplay", base::FEATURE_DISABLED_BY_DEFAULT}; -const base::Feature kAutofillUkmLogging{"AutofillUkmLogging", - base::FEATURE_DISABLED_BY_DEFAULT}; +const base::Feature kAutofillOfferLocalSaveIfServerCardManuallyEntered{ + "AutofillOfferLocalSaveIfServerCardManuallyEntered", + base::FEATURE_DISABLED_BY_DEFAULT}; const base::Feature kAutofillUpstreamRequestCvcIfMissing{ "AutofillUpstreamRequestCvcIfMissing", base::FEATURE_DISABLED_BY_DEFAULT}; +const base::Feature kAutofillUpstreamUseAutofillProfileComparator{ + "AutofillUpstreamUseAutofillProfileComparator", + base::FEATURE_ENABLED_BY_DEFAULT}; +const base::Feature kAutofillUpstreamUseNotRecentlyUsedAutofillProfile{ + "AutofillUpstreamUseNotRecentlyUsedAutofillProfile", + base::FEATURE_DISABLED_BY_DEFAULT}; const char kCreditCardSigninPromoImpressionLimitParamKey[] = "impression_limit"; const char kAutofillCreditCardPopupBackgroundColorKey[] = "background_color"; const char kAutofillCreditCardPopupDividerColorKey[] = "dropdown_divider_color"; @@ -48,6 +56,8 @@ const char kAutofillCreditCardPopupIsIconAtStartKey[] = const char kAutofillPopupMarginKey[] = "margin"; const char kAutofillCreditCardLastUsedDateShowExpirationDateKey[] = "show_expiration_date"; +const char kAutofillUpstreamMaxMinutesSinceAutofillProfileUseKey[] = + "max_minutes_since_autofill_profile_use"; namespace { @@ -227,8 +237,9 @@ bool IsCreditCardUploadEnabled(const PrefService* pref_service, return !group_name.empty() && group_name != "Disabled"; } -bool IsUkmLoggingEnabled() { - return base::FeatureList::IsEnabled(kAutofillUkmLogging); +bool IsAutofillOfferLocalSaveIfServerCardManuallyEnteredExperimentEnabled() { + return base::FeatureList::IsEnabled( + kAutofillOfferLocalSaveIfServerCardManuallyEntered); } bool IsAutofillUpstreamRequestCvcIfMissingExperimentEnabled() { @@ -239,4 +250,14 @@ bool IsAutofillUpstreamRequestCvcIfMissingExperimentEnabled() { #endif } +base::TimeDelta GetMaxTimeSinceAutofillProfileUseForCardUpload() { + int value; + const std::string param_value = variations::GetVariationParamValueByFeature( + kAutofillUpstreamUseNotRecentlyUsedAutofillProfile, + kAutofillUpstreamMaxMinutesSinceAutofillProfileUseKey); + if (!param_value.empty() && base::StringToInt(param_value, &value)) + return base::TimeDelta::FromMinutes(value); + return base::TimeDelta(); +} + } // namespace autofill |