#include "components/autofill/core/browser/autofill_ablation_study.h"
#include "base/base64.h"
#include "base/check_op.h"
#include "base/command_line.h"
#include "base/containers/span.h"
#include "base/hash/md5.h"
#include "base/memory/ptr_util.h"
#include "base/metrics/field_trial.h"
#include "base/no_destructor.h"
#include "base/numerics/byte_conversions.h"
#include "base/rand_util.h"
#include "base/strings/string_number_conversions.h"
#include "base/strings/string_util.h"
#include "base/time/time.h"
#include "components/autofill/core/browser/autofill_optimization_guide.h"
#include "components/autofill/core/common/autofill_clock.h"
#include "components/autofill/core/common/autofill_features.h"
#include "components/autofill/core/common/autofill_prefs.h"
#include "components/optimization_guide/proto/hints.pb.h"
#include "components/prefs/pref_service.h"
#include "third_party/icu/source/i18n/unicode/timezone.h"
#include "url/gurl.h"
#include "url/origin.h"
namespace autofill {
kAutofillAblationStudyAblationWeightPerMilleList1Param;
kAutofillAblationStudyAblationWeightPerMilleList2Param;
kAutofillAblationStudyAblationWeightPerMilleList3Param;
kAutofillAblationStudyAblationWeightPerMilleList4Param;
kAutofillAblationStudyAblationWeightPerMilleList5Param;
kAutofillAblationStudyAblationWeightPerMilleList6Param;
kAutofillAblationStudyAblationWeightPerMilleParam;
kAutofillAblationStudyEnabledForAddressesParam;
kAutofillAblationStudyEnabledForPaymentsParam;
kAutofillEnableAblationStudy;
kAutofillShowTypePredictions;
namespace {
constexpr size_t kSeedLengthInBytes = …;
inline uint64_t DigestToUInt64(const base::MD5Digest& digest) { … }
std::string GetSeed(PrefService* pref_service) { … }
}
int DaysSinceLocalWindowsEpoch(base::Time now) { … }
uint64_t GetAblationHash(const std::string& seed,
const GURL& url,
base::Time now) { … }
int GetDayInAblationWindow(base::Time now) { … }
AutofillAblationStudy::AutofillAblationStudy(std::string_view seed)
: … { … }
AutofillAblationStudy::AutofillAblationStudy(PrefService* local_state)
: … { … }
AutofillAblationStudy::~AutofillAblationStudy() = default;
const AutofillAblationStudy& AutofillAblationStudy::disabled_study() { … }
AblationGroup AutofillAblationStudy::GetAblationGroup(
const GURL& url,
FormTypeForAblationStudy form_type,
AutofillOptimizationGuide* autofill_optimization_guide) const { … }
AblationGroup AutofillAblationStudy::GetAblationGroupImpl(
const GURL& url,
base::Time now,
uint32_t ablation_weight_per_mille) const { … }
}