| Index: components/password_manager/core/browser/psl_matching_helper.cc
|
| diff --git a/components/password_manager/core/browser/psl_matching_helper.cc b/components/password_manager/core/browser/psl_matching_helper.cc
|
| index 8230ef030579487ee39eb776bace55128e59af5c..d34abebd411eac7077b8ef11ff1ed1c4b2f5fe92 100644
|
| --- a/components/password_manager/core/browser/psl_matching_helper.cc
|
| +++ b/components/password_manager/core/browser/psl_matching_helper.cc
|
| @@ -7,6 +7,7 @@
|
| #include "base/command_line.h"
|
| #include "base/logging.h"
|
| #include "base/memory/scoped_ptr.h"
|
| +#include "base/metrics/field_trial.h"
|
| #include "components/autofill/core/common/password_form.h"
|
| #include "components/password_manager/core/common/password_manager_switches.h"
|
| #include "net/base/registry_controlled_domains/registry_controlled_domain.h"
|
| @@ -14,6 +15,15 @@
|
|
|
| using autofill::PasswordForm;
|
|
|
| +#if !defined(OS_ANDROID) && !defined(OS_IOS)
|
| +namespace {
|
| +
|
| +const char kPSLMatchingDesktopFieldTrialName[] = "PSLMatchingDesktop";
|
| +const char kPSLMatchingDesktopFieldTrialDisabledGroupName[] = "Disabled";
|
| +
|
| +} // namespace
|
| +#endif
|
| +
|
| bool PSLMatchingHelper::psl_enabled_override_ = false;
|
|
|
| PSLMatchingHelper::PSLMatchingHelper() : psl_enabled_(DeterminePSLEnabled()) {}
|
| @@ -58,6 +68,12 @@ bool PSLMatchingHelper::DeterminePSLEnabled() {
|
| // Default choice is "enabled", so we do not need to check for
|
| // kEnablePasswordAutofillPublicSuffixDomainMatching.
|
| bool enabled = true;
|
| +#if !defined(OS_ANDROID) && !defined(OS_IOS)
|
| + if (base::FieldTrialList::FindFullName(kPSLMatchingDesktopFieldTrialName) ==
|
| + kPSLMatchingDesktopFieldTrialDisabledGroupName) {
|
| + enabled = false;
|
| + }
|
| +#endif
|
| if (CommandLine::ForCurrentProcess()->HasSwitch(
|
| switches::kDisablePasswordAutofillPublicSuffixDomainMatching)) {
|
| enabled = false;
|
|
|