[AF] Clean up AutofillEnableSendingBcnInGetUploadDetails
Fixed: 1374751
Change-Id: I708709ed0a1a14b18551dc639aba59e32341787f
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4022101
Auto-Submit: Jared Saul <jsaul@google.com>
Reviewed-by: Vinny Persky <vinnypersky@google.com>
Commit-Queue: Vinny Persky <vinnypersky@google.com>
Cr-Commit-Position: refs/heads/main@{#1071714}
diff --git a/android_webview/java/src/org/chromium/android_webview/common/ProductionSupportedFlagList.java b/android_webview/java/src/org/chromium/android_webview/common/ProductionSupportedFlagList.java
index bcb468b8..86d5e3d 100644
--- a/android_webview/java/src/org/chromium/android_webview/common/ProductionSupportedFlagList.java
+++ b/android_webview/java/src/org/chromium/android_webview/common/ProductionSupportedFlagList.java
@@ -174,8 +174,6 @@
"Enables Autofill to use its new method to retrieve parsing patterns."),
Flag.baseFeature(AutofillFeatures.AUTOFILL_PAGE_LANGUAGE_DETECTION,
"Enables Autofill to retrieve the page language for form parsing."),
- Flag.baseFeature(AutofillFeatures.AUTOFILL_ENABLE_SENDING_BCN_IN_GET_UPLOAD_DETAILS,
- "Enables sending billing customer number in GetUploadDetails."),
Flag.baseFeature(AutofillFeatures.AUTOFILL_PARSE_MERCHANT_PROMO_CODE_FIELDS,
"When enabled, Autofill will attempt to find merchant promo/coupon/gift code "
+ "fields when parsing forms."),
diff --git a/chrome/browser/about_flags.cc b/chrome/browser/about_flags.cc
index 06a64d0..e4544f5 100644
--- a/chrome/browser/about_flags.cc
+++ b/chrome/browser/about_flags.cc
@@ -9113,16 +9113,7 @@
kOsDesktop,
FEATURE_VALUE_TYPE(
policy::features::kEnableUserCloudSigninRestrictionPolicyFetcher)},
-#endif
- {"autofill-enable-sending-bcn-in-get-upload-details",
- flag_descriptions::kAutofillEnableSendingBcnInGetUploadDetailsName,
- flag_descriptions::kAutofillEnableSendingBcnInGetUploadDetailsDescription,
- kOsAll,
- FEATURE_VALUE_TYPE(
- autofill::features::kAutofillEnableSendingBcnInGetUploadDetails)},
-
-#if !BUILDFLAG(IS_ANDROID)
{"enable-code-based-rbd", flag_descriptions::kCodeBasedRBDName,
flag_descriptions::kCodeBasedRBDDescription, kOsDesktop,
FEATURE_WITH_PARAMS_VALUE_TYPE(commerce::kCodeBasedRBD,
@@ -9141,7 +9132,6 @@
FEATURE_WITH_PARAMS_VALUE_TYPE(commerce::kMerchantWidePromotion,
kMerchantWidePromotionVariations,
"MerchantWidePromotion")},
-
#endif
{"autofill-enable-unmask-card-request-set-instrument-id",
diff --git a/chrome/browser/flag-metadata.json b/chrome/browser/flag-metadata.json
index c71c3c14..5c5c946 100644
--- a/chrome/browser/flag-metadata.json
+++ b/chrome/browser/flag-metadata.json
@@ -501,14 +501,6 @@
"expiry_milestone": 110
},
{
- "name": "autofill-enable-sending-bcn-in-get-upload-details",
- "owners": [
- "jsaul@google.com",
- "payments-autofill-team@google.com"
- ],
- "expiry_milestone": 108
- },
- {
"name": "autofill-enable-sticky-manual-fallback-for-cards",
"owners": [ "siashah","siyua" ],
"expiry_milestone": 112
diff --git a/chrome/browser/flag_descriptions.cc b/chrome/browser/flag_descriptions.cc
index 69602ef..d7631167 100644
--- a/chrome/browser/flag_descriptions.cc
+++ b/chrome/browser/flag_descriptions.cc
@@ -417,12 +417,6 @@
"When enabled, some extra metrics logging for Autofill Downstream will "
"start.";
-const char kAutofillEnableSendingBcnInGetUploadDetailsName[] =
- "Enable sending billing customer number in GetUploadDetails";
-const char kAutofillEnableSendingBcnInGetUploadDetailsDescription[] =
- "When enabled the billing customer number will be sent in the "
- "GetUploadDetails preflight calls.";
-
const char kAutofillEnableStickyManualFallbackForCardsName[] =
"Make manual fallback sticky for credit cards";
const char kAutofillEnableStickyManualFallbackForCardsDescription[] =
diff --git a/chrome/browser/flag_descriptions.h b/chrome/browser/flag_descriptions.h
index b14373b..333f09f8 100644
--- a/chrome/browser/flag_descriptions.h
+++ b/chrome/browser/flag_descriptions.h
@@ -236,9 +236,6 @@
extern const char kAutofillEnableRemadeDownstreamMetricsName[];
extern const char kAutofillEnableRemadeDownstreamMetricsDescription[];
-extern const char kAutofillEnableSendingBcnInGetUploadDetailsName[];
-extern const char kAutofillEnableSendingBcnInGetUploadDetailsDescription[];
-
extern const char kAutofillEnableStickyManualFallbackForCardsName[];
extern const char kAutofillEnableStickyManualFallbackForCardsDescription[];
diff --git a/components/autofill/core/browser/payments/payments_client_unittest.cc b/components/autofill/core/browser/payments/payments_client_unittest.cc
index dae51800..6d34111 100644
--- a/components/autofill/core/browser/payments/payments_client_unittest.cc
+++ b/components/autofill/core/browser/payments/payments_client_unittest.cc
@@ -162,8 +162,6 @@
test_personal_data_.SetAccountInfoForPayments(
identity_test_env_.MakePrimaryAccountAvailable(
"example@gmail.com", signin::ConsentLevel::kSync));
- scoped_feature_list_.InitAndEnableFeature(
- features::kAutofillEnableSendingBcnInGetUploadDetails);
}
void TearDown() override { client_.reset(); }
@@ -253,8 +251,6 @@
}
protected:
- base::test::ScopedFeatureList scoped_feature_list_;
-
// Issue a GetUnmaskDetails request. This requires an OAuth token before
// starting the request.
void StartGettingUnmaskDetails() {
@@ -1308,10 +1304,6 @@
}
TEST_F(PaymentsClientTest, GetDetailsIncludeBillingCustomerNumber) {
- scoped_feature_list_.Reset();
- scoped_feature_list_.InitAndEnableFeature(
- features::kAutofillEnableSendingBcnInGetUploadDetails);
-
StartGettingUploadDetails();
// Verify that the billing customer number is included in the request if flag
@@ -1323,12 +1315,9 @@
TEST_F(PaymentsClientTest,
GetDetailsExcludesBillingCustomerNumberIfNoBcnExists) {
- scoped_feature_list_.Reset();
- scoped_feature_list_.InitAndEnableFeature(
- features::kAutofillEnableSendingBcnInGetUploadDetails);
-
StartGettingUploadDetails(
PaymentsClient::UploadCardSource::UNKNOWN_UPLOAD_CARD_SOURCE, 0L);
+
// Verify that the billing customer number is not included in the request if
// billing customer number is 0.
EXPECT_TRUE(GetUploadData().find("\"external_customer_id\"") ==
@@ -1337,21 +1326,6 @@
std::string::npos);
}
-TEST_F(PaymentsClientTest,
- GetDetailsExcludesBillingCustomerNumberIfFlagDisabled) {
- scoped_feature_list_.Reset();
- scoped_feature_list_.InitAndDisableFeature(
- features::kAutofillEnableSendingBcnInGetUploadDetails);
-
- StartGettingUploadDetails();
- // Verify that the billing customer number is not included in the request if
- // flag is disabled.
- EXPECT_TRUE(GetUploadData().find("\"external_customer_id\"") ==
- std::string::npos);
- EXPECT_TRUE(GetUploadData().find("\"customer_context\"") ==
- std::string::npos);
-}
-
TEST_F(PaymentsClientTest, GetDetailsFollowedByUploadSuccess) {
StartGettingUploadDetails();
ReturnResponse(
@@ -1511,8 +1485,8 @@
TEST_F(PaymentsClientTest,
UploadSuccessGetDetailsForEnrollmentResponseDetailsPresent) {
- scoped_feature_list_.Reset();
- scoped_feature_list_.InitAndEnableFeature(
+ base::test::ScopedFeatureList scoped_feature_list;
+ scoped_feature_list.InitAndEnableFeature(
features::kAutofillEnableGetDetailsForEnrollParsingInUploadCardResponse);
StartUploading(/*include_cvc=*/true);
IssueOAuthToken();
diff --git a/components/autofill/core/browser/payments/payments_requests/get_upload_details_request.cc b/components/autofill/core/browser/payments/payments_requests/get_upload_details_request.cc
index dce0290..f42cb40 100644
--- a/components/autofill/core/browser/payments/payments_requests/get_upload_details_request.cc
+++ b/components/autofill/core/browser/payments/payments_requests/get_upload_details_request.cc
@@ -55,9 +55,7 @@
base::Value::Dict context;
context.Set("language_code", app_locale_);
context.Set("billable_service", billable_service_number_);
- if (base::FeatureList::IsEnabled(
- features::kAutofillEnableSendingBcnInGetUploadDetails) &&
- billing_customer_number_ != 0) {
+ if (billing_customer_number_ != 0) {
context.Set("customer_context",
BuildCustomerContextDictionary(billing_customer_number_));
}
diff --git a/components/autofill/core/common/autofill_payments_features.cc b/components/autofill/core/common/autofill_payments_features.cc
index e753b428..7eeb7cc 100644
--- a/components/autofill/core/common/autofill_payments_features.cc
+++ b/components/autofill/core/common/autofill_payments_features.cc
@@ -112,12 +112,6 @@
"AutofillEnableRemadeDownstreamMetrics",
base::FEATURE_ENABLED_BY_DEFAULT);
-// Controls whether we send billing customer number in GetUploadDetails
-// preflight call.
-BASE_FEATURE(kAutofillEnableSendingBcnInGetUploadDetails,
- "AutofillEnableSendingBcnInGetUploadDetails",
- base::FEATURE_ENABLED_BY_DEFAULT);
-
// When enabled, if the user interacts with the manual fallback bottom sheet
// on Android, it'll remain sticky until the user dismisses it.
BASE_FEATURE(kAutofillEnableStickyManualFallbackForCards,
diff --git a/components/autofill/core/common/autofill_payments_features.h b/components/autofill/core/common/autofill_payments_features.h
index dc87b77..00ed44f 100644
--- a/components/autofill/core/common/autofill_payments_features.h
+++ b/components/autofill/core/common/autofill_payments_features.h
@@ -27,7 +27,6 @@
BASE_DECLARE_FEATURE(kAutofillEnableOfferNotificationForPromoCodes);
BASE_DECLARE_FEATURE(kAutofillEnableOffersInClankKeyboardAccessory);
BASE_DECLARE_FEATURE(kAutofillEnableRemadeDownstreamMetrics);
-BASE_DECLARE_FEATURE(kAutofillEnableSendingBcnInGetUploadDetails);
BASE_DECLARE_FEATURE(kAutofillEnableStickyManualFallbackForCards);
BASE_DECLARE_FEATURE(kAutofillEnableUnmaskCardRequestSetInstrumentId);
BASE_DECLARE_FEATURE(kAutofillEnableUpdateVirtualCardEnrollment);
diff --git a/ios/chrome/browser/flags/about_flags.mm b/ios/chrome/browser/flags/about_flags.mm
index 4f97b3a..e588df4 100644
--- a/ios/chrome/browser/flags/about_flags.mm
+++ b/ios/chrome/browser/flags/about_flags.mm
@@ -1002,12 +1002,6 @@
{"enable-password-grouping", flag_descriptions::kPasswordsGroupingName,
flag_descriptions::kPasswordsGroupingDescription, flags_ui::kOsIos,
FEATURE_VALUE_TYPE(password_manager::features::kPasswordsGrouping)},
- {"autofill-enable-sending-bcn-in-get-upload-details",
- flag_descriptions::kAutofillEnableSendingBcnInGetUploadDetailsName,
- flag_descriptions::kAutofillEnableSendingBcnInGetUploadDetailsDescription,
- flags_ui::kOsIos,
- FEATURE_VALUE_TYPE(
- autofill::features::kAutofillEnableSendingBcnInGetUploadDetails)},
{"enable-fullscreen-api", flag_descriptions::kEnableFullscreenAPIName,
flag_descriptions::kEnableFullscreenAPIDescription, flags_ui::kOsIos,
FEATURE_VALUE_TYPE(web::features::kEnableFullscreenAPI)},
diff --git a/ios/chrome/browser/flags/ios_chrome_flag_descriptions.cc b/ios/chrome/browser/flags/ios_chrome_flag_descriptions.cc
index 1c944ff2..4de084c 100644
--- a/ios/chrome/browser/flags/ios_chrome_flag_descriptions.cc
+++ b/ios/chrome/browser/flags/ios_chrome_flag_descriptions.cc
@@ -50,12 +50,6 @@
"When enabled, some extra metrics logging for Autofill Downstream will "
"start.";
-const char kAutofillEnableSendingBcnInGetUploadDetailsName[] =
- "Enable sending billing customer number in GetUploadDetails";
-const char kAutofillEnableSendingBcnInGetUploadDetailsDescription[] =
- "When enabled the billing customer number will be sent in the "
- "GetUploadDetails preflight calls.";
-
const char kAutofillEnableUnmaskCardRequestSetInstrumentIdName[] =
"When enabled, sets non-legacy instrument ID in UnmaskCardRequest";
const char kAutofillEnableUnmaskCardRequestSetInstrumentIdDescription[] =
diff --git a/ios/chrome/browser/flags/ios_chrome_flag_descriptions.h b/ios/chrome/browser/flags/ios_chrome_flag_descriptions.h
index 99982a35..957b335 100644
--- a/ios/chrome/browser/flags/ios_chrome_flag_descriptions.h
+++ b/ios/chrome/browser/flags/ios_chrome_flag_descriptions.h
@@ -46,11 +46,6 @@
extern const char kAutofillEnableRemadeDownstreamMetricsName[];
extern const char kAutofillEnableRemadeDownstreamMetricsDescription[];
-// Title and description for the flag enable sending billing customer number in
-// GetUploadDetails preflight call.
-extern const char kAutofillEnableSendingBcnInGetUploadDetailsName[];
-extern const char kAutofillEnableSendingBcnInGetUploadDetailsDescription[];
-
// Title and description for flag to enable sending non-legacy instrument ID in
// UnmaskCardRequest.
extern const char kAutofillEnableUnmaskCardRequestSetInstrumentIdName[];
diff --git a/testing/variations/fieldtrial_testing_config.json b/testing/variations/fieldtrial_testing_config.json
index 9d33708..fe745dd6 100644
--- a/testing/variations/fieldtrial_testing_config.json
+++ b/testing/variations/fieldtrial_testing_config.json
@@ -1152,29 +1152,6 @@
]
}
],
- "AutofillEnableSendingBcnInGetUploadDetails": [
- {
- "platforms": [
- "android",
- "android_webview",
- "chromeos",
- "chromeos_lacros",
- "fuchsia",
- "ios",
- "linux",
- "mac",
- "windows"
- ],
- "experiments": [
- {
- "name": "Enabled",
- "enable_features": [
- "AutofillEnableSendingBcnInGetUploadDetails"
- ]
- }
- ]
- }
- ],
"AutofillEnableSupportForParsingWithSharedLabels": [
{
"platforms": [