| Index: components/autofill/core/browser/autofill_manager.cc
|
| diff --git a/components/autofill/core/browser/autofill_manager.cc b/components/autofill/core/browser/autofill_manager.cc
|
| index 1eea943cd6bb46745419f9a7c33a188b2fd423c7..4ee1303a6d7f7731016cb93ac3f378f710c59fc0 100644
|
| --- a/components/autofill/core/browser/autofill_manager.cc
|
| +++ b/components/autofill/core/browser/autofill_manager.cc
|
| @@ -16,6 +16,7 @@
|
| #include "base/bind.h"
|
| #include "base/command_line.h"
|
| #include "base/containers/adapters.h"
|
| +#include "base/feature_list.h"
|
| #include "base/files/file_util.h"
|
| #include "base/guid.h"
|
| #include "base/logging.h"
|
| @@ -270,10 +271,13 @@ bool AutofillManager::ShouldShowScanCreditCard(const FormData& form,
|
| autofill_field->Type().GetStorableType() == CREDIT_CARD_NUMBER &&
|
| base::ContainsOnlyChars(CreditCard::StripSeparators(field.value),
|
| base::ASCIIToUTF16("0123456789"));
|
| - if (!is_card_number_field &&
|
| - autofill_field->Type().GetStorableType() != CREDIT_CARD_NAME_FULL) {
|
| +
|
| + bool is_scannable_name_on_card_field =
|
| + autofill_field->Type().GetStorableType() == CREDIT_CARD_NAME_FULL &&
|
| + base::FeatureList::IsEnabled(kAutofillScanCardholderName);
|
| +
|
| + if (!is_card_number_field && !is_scannable_name_on_card_field)
|
| return false;
|
| - }
|
|
|
| static const int kShowScanCreditCardMaxValueLength = 6;
|
| return field.value.size() <= kShowScanCreditCardMaxValueLength;
|
|
|