This source file includes following definitions.
- InDisableIgnoreAutocompleteOffGroup
- ShouldIgnoreAutocompleteOffForPasswordFields
#include "components/autofill/core/common/password_autofill_util.h"
#include "base/command_line.h"
#include "base/metrics/field_trial.h"
#include "components/autofill/core/common/autofill_switches.h"
namespace autofill {
namespace {
const char kDisableIgnoreAutocompleteOffFieldTrialName[] =
"DisableIgnoreAutocompleteOff";
const char kEnablingGroup[] = "ENABLED";
bool InDisableIgnoreAutocompleteOffGroup() {
std::string group_name = base::FieldTrialList::FindFullName(
kDisableIgnoreAutocompleteOffFieldTrialName);
return group_name.compare(kEnablingGroup) == 0;
}
}
bool ShouldIgnoreAutocompleteOffForPasswordFields() {
return !InDisableIgnoreAutocompleteOffGroup() &&
!CommandLine::ForCurrentProcess()->HasSwitch(
switches::kDisableIgnoreAutocompleteOff);
}
}